NetworkValidationConfig class final

Configuration options for network address validation.

Annotations
  • @immutable

Constructors

NetworkValidationConfig({bool allowEmpty = false, bool trimWhitespace = true, NetworkAddressType requiredType = NetworkAddressType.any, int? ipVersion})
Creates a NetworkValidationConfig.
const

Properties

allowEmpty → bool
Whether an empty string is considered valid.
final
hashCode → int
The hash code for this object.
no setteroverride
ipVersion → int?
Expected IP version for CIDR or IP checks (4, 6, or null for any).
final
requiredType → NetworkAddressType
Required network address type.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trimWhitespace → bool
Whether whitespace around the input should be trimmed before validation.
final

Methods

copyWith({bool? allowEmpty, bool? trimWhitespace, NetworkAddressType? requiredType, Object? ipVersion = unsetConfigValue}) → NetworkValidationConfig
Returns a copy with the supplied fields replaced.
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.
override