validate method
- String? value
override
Validates the value and returns an error string if it fails,
or null if it passes.
Implementation
@override
String? validate(String? value) {
if (value == null || value.isEmpty) return null;
if (!RegExp(r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$').hasMatch(value)) {
return message;
}
return null;
}