From 9d6d27dfae51b6987596101d7da5fa78f05908fe Mon Sep 17 00:00:00 2001 From: lonix1 <40320097+lonix1@users.noreply.github.com> Date: Tue, 5 Mar 2024 13:26:14 +0200 Subject: [PATCH] docs: events Add missing info re field validation events --- README.MD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.MD b/README.MD index 8f33eb3..7cb3756 100644 --- a/README.MD +++ b/README.MD @@ -169,6 +169,12 @@ v.addProvider('io', (value, element, params) => { }); ``` +## Controlling when validation occurs + +By default, validation occurs immediately upon changes to form fields: on `input` for inputs and textareas, and on `change` for selects. + +One can change to a different event by setting a field's `data-val-event` attribute. For example, one can use `data-val-event="blur"` to validate that field on the `blur` event. + ## Subscribing to Client Form Validation Event ```ts