Edit this page

up.form up:form:validate
DOM event

This event is emitted before a form is being validated.


Event properties

event.target Element

The form that is being validated.

event.form Element

The form that is being validated.

event.params up.Params

The form parameters that will be sent as the form's request payload.

Listeners may inspect and modify params before they are sent. Note that the request may be a batch of multiple validations.

event.fields Element experimental

The form fields that triggered this validation pass.

When multiple fields are validating within the same task, Unpoly will make a single validation request with multiple targets.

event.renderOptions Object

An object with render options for the fragment update that will show the validation results.

Listeners may inspect and modify these options. Note that the request may be a batch of multiple validations.

event.preventDefault()

Prevents the validation request from being sent to the server.