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
-
- Object
- AskValidator
- AskValidatorIPAddress
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 passedversion
must be 4 or 6.const
Properties
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