Validator Callbacks
This section delves into Validator Callbacks, explaining how they work and how you can leverage them to enhance your validation experience.
Understanding Validator Callbacks
Available Callbacks
Configuration Options
const customCallbacks = {
onSuccess: (formValidator) => {
// Custom logic to execute on validation success
// Access the Form Validator instance if needed
},
onFailure: (formValidator) => {
// Custom logic to execute on validation failure
// Access the Form Validator instance if needed
}
};
// add Form Validator opions to reqEase Options:
const reqEase = new ReqEase({
// Other options...
validation: {
// Other options...
callbacks: customCallbacks,
}
});When to Use Validator Callbacks
Last updated
Was this helpful?