validators
validators copied to clipboard
This library need a computed rule
like this,
ComputedValidationRule("Password is not matching.", (text) {
return pwdController.text ==pwdAgainController.text;
},
)
class ComputedValidationRule extends TextValidationRule {
bool Function(String text) computed;
ComputedValidationRule(String? error, this.computed) : super(error);
@override
bool isValid(String input) => computed(input);
@override
String toString() => 'computedValidationRule';
}
thanks , its great idea will add it ASAP