postalCode method
Validates the postal code for a specific country.
Implementation
@override
String? postalCode(String? value) {
if (value == null || value.trim().isEmpty) {
return 'Postal code is required';
}
if (!_plzRegex.hasMatch(value.trim())) {
return 'Invalid German postal code';
}
return null;
}