equalTo method
Adds an EqualToRule to the validator.
The target parameter specifies the value that the input should be equal to.
The errorMessage parameter is optional and can be used to provide a custom error message.
Implementation
Validator equalTo(num target, {String? errorMessage}) {
addRule(EqualToRule(target, errorMessage: errorMessage));
return this;
}