Validation meanschecking any dynamic form element value for changes in a script and displaying errors, if the check failed. To use validation in a process, add a script to a context variable.
Validation can be implemented for one or several fields at the same time.
Starting with version 3.11, new methods are used for validating the form script parameter:
form.For(m => m.Field).Validation.Error(message);
form.For(m => m.Field).Validation.Ok();
where:
m => m.Field – indicate the form property, to perform actions for;
Validation.Error(message) – set a message (message string parameter) that the property has not passed the validation;
Validation.Ok() – reset the message and indicate that the property has a valid value.
Note, that Validation.Ok() resets only the messages, set by the Validation.Error(message) method. This method cannot remove the messages, set by other validations (e.g. Fill in the required field).
Fig. 3. Value validation example
Fig. 4. Value validation example
If the values in the Password and Confirm Password fields match, the validation will be passed and the Next button will become available (fig. 5).