InputValidation class
Constructors
- InputValidation.new({required InputValidationMode mode, int? minLen, int? maxLen})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxLen → int?
-
final
- minLen → int?
-
specify min and max length for the input
final
- mode → InputValidationMode
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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? input, [String emptyInputErrorMessage = 'Please enter a value here', String generalError = 'The value provided is not correct']) → String? -
return error message if input is not valid given the current mode
otherwise return null, emphasising that there was no problem with the
input
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- emailValidator → const InputValidation
- nameValidator → const InputValidation
- numberValidator → const InputValidation