Validation().validated() method
Adds state callbacks which will be invoked during the execution of the Validation().validate()
method after predicates execution.
Syntax
Parameters
-
callback1, ..., callbackN
Functions to add. The callback functions will be called with the following arguments:validationResult
AValidationResult
object.
Return value
The Validation
object.
Exceptions
If anything other than a function is passed in the corresponding error will be thrown.
Description
Adds state callbacks to the Validation
object. Once the Validation
in the specified state, the corresponding callbacks will be invoked one by one in the order they were added. The main purpose of state callbacks is to perform side effects related to the state. A ValidationResult
object is passed into state callbacks.