PhoneNumber class

PhoneNumber validator permits you to check that a string value is a valid phone number.

Inheritance

Constructors

PhoneNumber({String countryCode, PhoneNumberType phoneNumberType, String countryCodeOnProperty, String phoneNumberTypeOnProperty, @required String error})
const

Properties

countryCode String
countryCode is the country code.
final
countryCodeOnProperty String
countryCodeOnProperty is the name of targeted property that user uses to provide country code. This one has priority on countryCode value.
final
criticityLevel int
This reprensents the order of execution for validation. If a validator returns false, the queue will stop on this point. Nexts validators won't be fired.
final, inherited
error String
error is the custom error to return in case of invalidation.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
phoneNumberType PhoneNumberType
phoneNumberType is the type of phone number, landline or mobile phone.
final
phoneNumberTypeOnProperty String
phoneNumberTypeOnProperty is the name of targeted property that user uses to provide phone number type. This one has priority on phoneNumberType value.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

isValid<TModel>(String value, TModel model) bool
Verify if the model is valid compared to the current validator You must add value parameter, this one is your current property to validate. model parameter is also required, even if your custom validator won't use it. It reprensents your full object model with all values. Maybe you would validate a property in comparison to others.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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