Validates whether the input value is empty or not.
String? requiredValidator(String value) => value.isEmpty ? 'This field is required.' : null;