LyIntNonNegative class
Validate the value
is not negative.
If the provided value
is negative then it will be invalid and will return
the error message, otherwise it returns null.
Example:
final validation = IntNonNegative('Must be non negative');
final result = validation(-1);
print(result); // Must be non negative
Constructors
- LyIntNonNegative(String message)
-
Validate the
value
is not negative.
Properties
Methods
-
call(
int value) → String? -
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 &(
LyBaseValidator< int> other) → LyBaseValidator<int> -
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator |(
LyBaseValidator< int> other) → LyBaseValidator<int> -
inherited