ValidatorLocalizations class

A class for handling validation-related localizations.

This class provides localized validation error messages for various validation rules.

run this command to generate the validator_messages_all.dart file: dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/validator_localizations.dart lib/l10n/validator_messages_*.arb

Properties

hashCode int
The hash code for this object.
no setterinherited
localeName String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

alphaDashValidationMessage(String fieldName) String
Generates a validation error message for a field that may only contain alphanumeric characters, dashes, and underscores.
alphaNumValidationMessage(String fieldName) String
Generates a validation error message for a field that must only contain alphanumeric characters.
alphaValidationMessage(String fieldName) String
Generates a validation error message for a field that should contain only alphabetic characters.
betweenValidationMessage(String fieldName, num min, num max) String
Generates a validation error message for a field that should have a size between two values.
booleanValidationMessage(String fieldName) String
Generates a validation error message for a field that should be boolean.
confirmedValidationMessage(String fieldName) String
Generates a validation error message for a field that needs confirmation.
dateAfterValidationMessage(String fieldName, String after) String
Generates a validation error message for a date field that must be after another date.
dateBeforeValidationMessage(String fieldName, String before) String
Generates a validation error message for a date field that must be before another date.
dateFormatValidationMessage(String fieldName, String format) String
Generates a validation error message for a field that should comply with a specific date format.
dateValidationMessage(String fieldName) String
Generates a validation error message for a field that should be a valid date.
differentValidationMessage(String fieldName, String field) String
Generates a validation error message for a field that should have a different value from another field.
digitsBetweenValidationMessage(String fieldName, num min, num max) String
Generates a validation error message for a field that should have a length between two values.
digitsValidationMessage(String fieldName, int value) String
Generates a validation error message for a field that should be numeric with a specific length.
emailValidationMessage(String fieldName) String
Generates a validation error message for an invalid email field.
fileSizeValidationMessage(String fieldName, int size) String
fileTypeValidationMessage(String fieldName, String type) String
integerValidationMessage(String fieldName) String
Generates a validation error message for a field that should be an integer.
inValuesValidationMessage(String fieldName) String
Generates a validation error message for a field that must be in a list.
isFalseValidationMessage(String fieldName) String
Generates a validation error message for a field that must be unchecked.
isTrueValidationMessage(String fieldName) String
Generates a validation error message for a field that must be checked.
maxLengthValidationMessage(String fieldName, int length) String
Generates a validation error message for a field longer than the maximum length.
maxSelectedValidationMessage(String fieldName, int max) String
Generates a validation error message for a field that must have a maximum number of selected values.
maxValueValidationMessage(String fieldName, int value) String
Generates a validation error message for a field with maximum value.
minLengthValidationMessage(String fieldName, int length) String
Generates a validation error message for a field shorter than the minimum length.
minSelectedValidationMessage(String fieldName, int min) String
Generates a validation error message for a field that must have a minimum number of selected values.
minValueValidationMessage(String fieldName, int value) String
Generates a validation error message for a field with minimum value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notInValuesValidationMessage(String fieldName) String
Generates a validation error message for a field that should not be in a list.
numericValidationMessage(String fieldName) String
Generates a validation error message for a field that should be numeric.
phoneNumberValidationMessage(String fieldName) String
Generates a validation error message for a field that must be a valid phone number. This message indicates that the field fieldName must be a valid phone number.
rangeSelectedValidationMessage(String fieldName, int min, int max) String
Generates a validation error message for a field that must have a range of selected values.
regexValidationMessage(String fieldName) String
Generates a validation error message for a field that must match a regex pattern.
requiredValidationMessage(String fieldName) String
Generates a validation error message for a required field.
sameValidationMessage(String fieldName, String field) String
Generates a validation error message for a field that should have the same value as another field.
sizeValidationMessage(String fieldName, int value) String
Generates a validation error message for a field that should have a specific size.
toString() String
A string representation of this object.
inherited
urlValidationMessage(String fieldName) String
Generates a validation error message for a field that must be a valid URL.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

load(Locale locale) Future<ValidatorLocalizations>
Loads the ValidatorLocalizations instance for the given locale.