Validators class
A collection of common validators that can be reused
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- amountPattern → RegExp
-
final
- emailPattern → RegExp
-
final
- emailPhonePattern → RegExp
-
final
- phonePattern → RegExp
-
final
Static Methods
-
accountNumber(
) → Validator -
amount(
[String? text]) → Validator -
confirmPass(
String val1, [String? text]) → Validator -
containsLower(
[String? text]) → Validator -
containsNumber(
[String? text]) → Validator -
containsSpace(
[String? text]) → Validator -
containsSpecialChar(
[String? text]) → Validator -
containsUpper(
[String? text]) → Validator -
custom(
bool valid, String message) → Validator -
date(
) → Validator -
email(
[String? text]) → Validator -
emailPhone(
[String? text]) → Validator -
fname(
) → Validator -
greaterThan(
double val, [String? text]) → Validator -
isValid(
String pin, String pin2) → bool -
lessThan(
double val, [String? text]) → Validator -
matchPattern(
Pattern pattern, [String? patternName, String? text]) → Validator -
maxLength(
int maxLength, [String? text]) → Validator -
minLength(
int minLength, [String? text]) → Validator -
multiple(
List< Validator> validators, {bool shouldTrim = true}) → Validator - Creates a validator that if the combination of multiple validators.
-
name(
) → Validator -
password(
[int minimumLength = 8, String? text]) → Validator -
phone(
[String countryCode = 'NG', String? text]) → Validator -
required(
[bool strict = false]) → Validator -
username(
) → Validator