Computed
asyncThe number of pending/running async jobs.
Computed
firstGet the first error message (including nested objects)
Computed
invalidThe number of invalid keys
Computed
invalidThe number of invalid key paths
Computed
invalidThe key paths that have errors
Keys of nested objects are included.
Computed
invalidThe keys that have errors
Keys of nested objects are NOT included.
Computed
isWhether no errors are found
Computed
isWhether the validator is computing errors
Computed
reactionThe number of pending/running reactions.
Static
getStatic
getGet a validator instance for the target object.
Same as Validator.get but returns null instead of throwing an error.
Action
addAdd an async handler
The expression to observe
The async handler to call when the expression changes
Optional
opt: HandlerOptions<NoInfer<Expr>>The handler options
A function to remove the handler
Add a sync handler
The sync handler containing observable expressions
Optional
opt: HandlerOptions<unknown>A function to remove the handler
Find errors for the key path
Get error messages for the key path
Check if the validator has errors for the key path
Action
resetReset the validator
Use with caution.
Since validation is reactive, errors won't reappear until you make some changes.
Action
updateUpdate the errors immediately
A function to remove the errors
Validator for handling synchronous and asynchronous validations