ValidatorString class
Validators that are specifically for String only
Constructors
- ValidatorString(dynamic value)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ dynamic
-
getter/setter pairinherited
Methods
-
build(
) → String? -
inherited
-
contains(
String subStr, {String errMsg(String subStr)?}) → ValidatorString -
digitsOnly(
{String errMsg = 'Digits only'}) → ValidatorString -
email(
{String errMsg = 'Not a valid email'}) → ValidatorString -
length(
{int min = 0, int max = int64Max, String errMsg(String val, int min, int max)?}) → Validator -
Checks the length of the value
makes sure it's between
min
andmax
rangeinherited -
minLen(
int min, {String errMsg(int min)?}) → ValidatorString -
noDigits(
{String errMsg = 'Can not contain any digits'}) → ValidatorString -
noSpecialChars(
String chars, {String errMsg(String ex)?}) → ValidatorString -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
noWhitespace(
{String errMsg = 'Can not contain white space'}) → ValidatorString -
optional(
) → Validator -
inherited
-
required(
{String errMsg = 'Field is required'}) → ValidatorString -
toString(
) → String -
A string representation of this object.
inherited
-
unless(
ValidationUnless checker) → Validator -
inherited
-
validate(
ValidationRule rule) → Validator -
inherited
-
validDate(
{String format = 'yyyy-MM-dd', String errMsg = 'Not a valid date'}) → ValidatorString
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited