PhoneValidationRule enum
Enum representing different rules for phone number validation.
Values
- checkFormat → const PhoneValidationRule
-
Checks if the phone number follows a valid format, typically E.164. This ensures the phone number is valid for international use and avoids incorrect formats such as multiple "+" symbols or invalid characters.
- checkMinLength → const PhoneValidationRule
-
Ensures the phone number meets the minimum length requirement. This helps avoid phone numbers that are too short to be valid.
- checkMaxLength → const PhoneValidationRule
-
Ensures the phone number does not exceed the maximum length. This helps avoid overly long and potentially invalid phone numbers.
- preventSpecialCharacters → const PhoneValidationRule
-
Disallows special characters in the phone number. For example, characters such as "-", "(", ")" will be considered invalid if this rule is applied.
- checkStartsWithCountryCode → const PhoneValidationRule
-
Ensures the phone number starts with a valid country code. The country code can be specified in the validation options, and numbers without the appropriate prefix will be flagged as invalid.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
PhoneValidationRule> - A constant List of the values in this enum, in order of their declaration.