FieldValidator<I> class
abstract
Default implementation of Validator.
Can be used to define custom validators
- Implemented types
-
- Validator<
I>
- Validator<
- Implementers
- AfterDateTimeValidator
- BeforeDateTimeValidator
- EmailValidator
- EmptyIterableValidator
- EmptyMapValidator
- EmptyStringValidator
- EqualToValidator
- GreaterThanOrEqualValidator
- GreaterThanValidator
- LessThanOrEqualValidator
- LessThanValidator
- MaxCharactersValidator
- MinCharactersValidator
- NotEmptyIterableValidator
- NotEmptyMapValidator
- NotEmptyStringValidator
- NotEqualToValidator
- RegexpValidator
- UriValidator
Constructors
- FieldValidator({String? fieldName, required String message, bool ignoreNullable = true})
-
Defines
fieldName
andmessage
that will be used to generate validation error message if validation fails.const - FieldValidator.withMessage({required String message, bool ignoreNullable = true})
-
Defines full validation message if validation fails.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- ignoreNullable → bool
-
If validation can be invoked on
null
values.final - message → String
-
Validation error message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
I? value) → String? -
Invoke validation
override
-
isValid(
I? value) → bool - Validation function
-
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.
override