PhoneValidator class

Constructors

PhoneValidator()

Properties

hashCode int
The hash code for this object.
no setterinherited
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

Static Properties

none PhoneNumberInputValidator
no setter

Static Methods

compose(List<PhoneNumberInputValidator> validators) PhoneNumberInputValidator
allow to compose several validators Note that validator list order is important as first validator failing will return according message.
required({String? errorText}) PhoneNumberInputValidator
valid({String? errorText, bool allowEmpty = true}) PhoneNumberInputValidator
validCountry(List<IsoCode> expectedCountries, {String? errorText, bool allowEmpty = true}) PhoneNumberInputValidator
validFixedLine({String? errorText, bool allowEmpty = true}) PhoneNumberInputValidator
convenience shortcut method for invalidType(context, PhoneNumberType.fixedLine, ...)
validMobile({String? errorText, bool allowEmpty = true}) PhoneNumberInputValidator
convenience shortcut method for invalidType(context, PhoneNumberType.mobile, ...)
validType(PhoneNumberType expectedType, {String? errorText, bool allowEmpty = true}) PhoneNumberInputValidator