validateInput( )


Validates an input form field value against the registration form as defined in the site dashboard.

validateInput() returns {valid: true} if the value in the specified field is valid and throws an error if it's not valid.

You may want to call validateInput() in an input element's onCustomValidation() to validate an input while the form is being filled out.

Note: The frontend Events APIs aren't functional when previewing a site. View a published version of a site to see their complete functionality.

Method Declaration
Copy
Method Parameters
inputNamestringRequired

Name of the input field to validate.


formValuesArray<FormValue>Required

Field names and values for a registration form.

Returns
Return Type:ValidationResult
Did this help?