@override String? validate(String? value) { if (value == null || !RegExp(pattern).hasMatch(value)) { return errorText; } return null; }