ComputedasyncThe number of pending/running async jobs.
ComputedfirstGet the first error message (including nested objects)
ComputedinvalidThe number of invalid keys
ComputedinvalidThe number of invalid key paths
ComputedinvalidThe key paths that have errors
Keys of nested objects are included.
ComputedinvalidThe keys that have errors
Keys of nested objects are NOT included.
ComputedisWhether no errors are found
ComputedisWhether the validator is computing errors (including nested validators)
ComputedreactionThe number of pending/running reactions.
StaticgetStaticgetGet a validator instance for the target object.
Same as Validator.get but returns null instead of throwing an error.
ActionaddAdd an async handler
The expression to observe
The async handler to call when the expression changes
Optionalopt: HandlerOptions<NoInfer<Expr>>The handler options
A function to remove the handler
Add a sync handler
The sync handler containing observable expressions
Optionalopt: 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
ActionresetReset the validator
Use with caution.
Since validation is reactive, errors won't reappear until you make some changes.
ActionupdateUpdate the errors immediately
A function to remove the errors
Validator for handling synchronous and asynchronous validations