matchController static method
FormFieldValidator<String>
matchController({
- required TextEditingController controller,
- required String mismatchMessage,
Must equal the current text of controller (reads it on every check). UValidators.matchController(controller: passwordController, mismatchMessage: "Not the same")
Implementation
static FormFieldValidator<String> matchController({required TextEditingController controller, required String mismatchMessage}) => (String? value) {
if (value != controller.text) return mismatchMessage;
return null;
};