Alpha Button Validation Issue

How can I validate the button based on this form? If there are any errors, I want to disable the save button.

4 Likes

@gaurav.pandey @Irfan_Ali @vaibhav please help

2 Likes

Hi @Ziyad

You can check whether the renderer is valid based on form validation. For the dialog, you can get the instance of the dialog, then check whether the renderer is valid. Then, disable the button if it is invalid.

document.getElementById('dialog-id').querySelector('alpha-renderer').valid

[Alpha Snippets](https://community.neutrinos.com/t/useful-code-snippets-to-use-in-alpha-studio/117/2)
6 Likes

Thank you @Irfan_Ali it’s working

5 Likes