PhoneValidationOptions class

Validation options for phone numbers.

Constructors

PhoneValidationOptions({List<PhoneValidationRule> rules = const [PhoneValidationRule.checkFormat, PhoneValidationRule.checkMinLength, PhoneValidationRule.checkMaxLength], int minLength = 8, int maxLength = 15, List<CountryCode>? allowedCountryCodes, bool allowSpecialCharacters = true, bool checkCountryCode = false})
const

Properties

allowedCountryCodes → List<CountryCode>?
List of valid country codes (e.g., "+1" for the USA, "+91" for India).
final
allowSpecialCharacters → bool
Whether to allow special characters in the phone number.
final
checkCountryCode → bool
Whether to check the country code in validation.
final
hashCode → int
The hash code for this object.
no setterinherited
maxLength → int
Maximum length for the phone number.
final
minLength → int
Minimum length for the phone number.
final
rules → List<PhoneValidationRule>
List of rules to apply for phone number validation.
final
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