I have a submit button on a dialog and would like to write the JavaScript to submit the data if multiple fields on the dialog (field1, field, field3) are valid. I can do the if statement in JavaScript,but don't know how to inspect the relevant fields for validation (if values in these fields are valid, then action a else action b) in JavaScript.

Any suggestions, greatly appreciated.

Thank you!!