This website is in progress, you can read the docs from old onefrom Here →
ts-validation
Access the Validation Status

How To Access the Validation Status?

You can access your object property status, either to read it or to do some action on it.

This will help you to use the validators inside your forms, read more

1. Using provided methods:

the Validator class provides the following methods for accessing the property status:

methodreturndescription
validateItem(key)voidvalidate the item passed
isItemValid(key)boolean | undefinedcheck if the item is valid
itemMessage(key)string | undefinedreturn the message if the item is not valid

2. Directly from .items and .nested properties:

to access the property status, you can use the .items and .nested properties directly of the validator

validator.items.property.<action>;
validator.nested.nestedProprty.items.property.<Ta>;

action is a function (or property) you want to access to, the item properties are of type ValidatorItem.