PhoneValue class final

Immutable domain value object representing a validated phone number string.

Inheritance
Annotations
  • @immutable

Constructors

PhoneValue(String input, [PhoneValidationConfig config = const PhoneValidationConfig()])
Constructs a PhoneValue from a trusted input string. Throws ValueObjectException if input is invalid.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isSensitive → bool
Whether this value is sensitive (for example, a password).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → String
The validated underlying value.
final

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 Methods

tryParse(String input, [PhoneValidationConfig config = const PhoneValidationConfig()]) → Either<PhoneError, PhoneValue>
Attempts to parse input into a PhoneValue. Returns Either<PhoneError, PhoneValue>.