validateInput( )


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

The validateInput() function returns {valid: true} if the value in the specified field is valid or throws an error if it is not valid.

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

Note: To work with the Wix Events API, you need to publish your site.

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:Promise<ValidationResult>
Did this help?