exactLength static method
Fails unless exactly length characters. UValidators.exactLength(length: 10, message: "Must be 10 digits")
Implementation
static FormFieldValidator<String> exactLength({required int length, required String message}) => (String? value) {
if (value == null || value.length != length) return message;
return null;
};