Validation Session
The Validation session in Valgo is the main structure for validating one or more values. It is called ‘Validation’ in code.
A validation session will contain one or more Validators, where each Validator will have the responsibility to validate a value with one or more rules.
There are multiple functions to create a Validation session, depending on the requirements:
New(),Is(...),In(...),InRow(...),Check(...),AddErrorMessage(...)
Is(...) is likely to be the most frequently used function in your validations. When Is(...) is called, the function creates a validation and receives a validator at the same time. In the next section, you will learn more about the Is(...) function.