validate( )


Validates form fields and values against the registration form as defined in the site Dashboard.

について validate() function returns a Promise that resolves to {valid: true} if the fields and values in the registration form are valid or rejects if there are invalid fields or values.

When the validate() function is called, the validateInput() function also runs for all your form fields.

The following are invalid when checked against the event's registration form as defined in the site Dashboard:

  • The specified form values contain a field that does not exist in the event's registration form.
  • The specified form values are missing a field that exists in the event's registration form. You must also include non-required fields even if their values are empty.

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

メソッド宣言
コピー
メソッド・パラメータ
formValuesArray<FormValue>Required

Field names and values for a registration form.

リターン
Return Type:Promise<ValidationResult>
役に立ちましたか?
はい
いいえ