Skip to content

FormField.onShouldTriggerValidation

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / FormField<TValue, TValidationError> / onShouldTriggerValidation method

Invoked when the current instance's properties change, this is a plugin method to help reduce validations when changes do not have an effect on validation.

protected onShouldTriggerValidation(
  changedProperties: readonly (keyof FormField<TValue, TValidationError>)[]
): boolean

Source reference: src/forms/FormField.ts:279.

Parameters

Returns: boolean

Remarks

By default, only changes to FormField.value triggers validation. Changes to any other properties, such as FormField.error, FormField.isValid and FormField.isInvalid as well as any other properties that get added to a field do not trigger validation.

Clone this wiki locally