timeZone static method
FormFieldValidator that requires the field's value to be a valid time zone.
Parameters:
errorText
The error message when the time zone is invalid.checkNullOrEmpty
Whether to check for null or empty values.
Implementation
/// ## Parameters:
/// - [errorText] The error message when the time zone is invalid.
/// - [checkNullOrEmpty] Whether to check for null or empty values.
/// {@macro time_zone_template}
static FormFieldValidator<String> timeZone({
List<String>? validTimeZones,
String? errorText,
bool checkNullOrEmpty = true,
}) => TimeZoneValidator(
validTimeZones: validTimeZones,
errorText: errorText,
checkNullOrEmpty: checkNullOrEmpty,
).validate;