StringValidator class
- Inheritance
-
- Object
- GladeValidator<
String> - StringValidator
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
parts
↔ List<
InputValidatorPart< String> > -
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
{bool stopOnFirstError = true}) → ValidatorInstance< String> -
inherited
-
clear(
) → void -
inherited
-
custom(
ValidateFunction< String> onValidate, {Object? key}) → void -
Checks value with custom validation function.
inherited
-
customPart(
InputValidatorPart< String> part) → void -
Checks value through custom validator
part
.inherited -
exactLength(
{required int length, OnValidateError< String> ? devError, Object? key}) → void -
String's length has to be equal to provided
length
. -
isEmail(
{OnValidateError< String> ? devError, bool allowEmpty = false, Object? key}) → void - Checks that value is valid email address.
-
isUrl(
{OnValidateError< String> ? devError, bool allowEmpty = false, bool requiresScheme = false, Object key = GladeErrorKeys.stringNotUrl}) → void - Checks that value is valid URL address.
-
match(
{required String pattern, bool multiline = false, bool caseSensitive = true, bool dotAll = false, bool unicode = false, OnValidateError< String> ? devError, Object? key}) → void -
Matches provided regex
pattern
. -
maxLength(
{required int length, OnValidateError< String> ? devError, Object? key}) → void -
String's length has to be less or equal to provided
length
. -
minLength(
{required int length, OnValidateError< String> ? devError, Object? key}) → void -
String's length has to be greater or equal to provided
length
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEmpty(
{OnValidateError< String> ? devError, Object? key}) → void - Given value can't be empty string (or null).
-
notNull(
{OnValidateError< String> ? devError, Object? key}) → void -
Checks that value is not null. Returns ValueNullError error.
inherited
-
satisfy(
SatisfyPredicate< String> predicate, {OnValidateError<String> ? devError, Object? key}) → void -
Value must satisfy given
predicate
. Returns ValueSatisfyPredicateError.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited