Preparing to Use Validation
To use validation, you must make sure the form_validator object is defined.
To prepare to use validation
Use a JavaScript editor to open the forms.js file.
Make sure the form_validator object is defined.
To use validation, the forms.js file must include the following code near the start of the JavaScript function for that form:
var validator = new form_helpers.form_validator(ctx.session, ctx.form);
This code creates a form_validator object that you can use through the validator variable.