AskValidatorIPAddress class

Validates that input is a IP address By default both v4 and v6 addresses are valid Pass a version to limit the input to one or the other. If passed version must be ipv4 or ipv6.

Inheritance

Constructors

AskValidatorIPAddress({int version = either})
Validates that input is a IP address By default both v4 and v6 addresses are valid Pass a version to limit the input to one or the other. If passed version must be 4 or 6.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
IP version (on 4 and 6 are valid versions.)
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
validate(String line) String
This method is called by ask to valiate the string entered by the user. It should throw an AskValidatorException if the input is invalid. The validate method is called when the user hits the enter key. If the validation succeeds the validated line is returned.
override

Operators

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

Constants

either → const int
The ip address may be either ipv4 or ipv6.
ipv4 → const int
The ip address must be an ipv4 address.
ipv6 → const int
The ip address must be an ipv6 address.