Enable Client-Side Validation for a Form
You may want to set up a form so that your application can check the validity of its contents before the user submits it.
To do this, surround the form with an
oj-validation-group
element, and add a custom isFormValid
Javascript function that returns a boolean
. You can then call that function before the form is submitted.
Suppose you have a form with three text fields. To set up a basic client-side validation for this form:
You can now test the form validation.