ValidationRule class
BASE ValidationRule class Define the required details in the constructor to extend and build your own validation rule.
- Implementers
- BooleanRule
- CapitalizedRule
- ContainsRule
- DateAgeIsOlderRule
- DateAgeIsYoungerRule
- DateInFutureRule
- DateInPastRule
- DateRule
- EmailRule
- IsFalseRule
- IsTrueRule
- IsTypeRule
- LowerCaseRule
- MaxRule
- MinRule
- NotEmptyRule
- NumericRule
- PasswordV1Rule
- PasswordV2Rule
- PhoneNumberUkRule
- PhoneNumberUsRule
- PostCodeUkRule
- RegexRule
- StringRule
- UpperCaseRule
- URLRule
- ZipCodeUsRule
Constructors
Properties
- attribute ↔ String
-
getter/setter pair
- description ↔ String
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
info
↔ Map<
String, dynamic> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signature ↔ String
-
getter/setter pair
- textFieldMessage ↔ String?
-
getter/setter pair
- title ↔ String
-
getter/setter pair
Methods
-
alert(
dynamic context, {ToastNotificationStyleType style = ToastNotificationStyleType.warning, Duration? duration, Map< String, dynamic> ? info}) → dynamic - The alert which will be displayed.
-
handle(
Map< String, dynamic> info) → bool -
Handle the validation, the
info
variable will contain the following: info'rule'
= Validation rule i.e "min". info'data'
= Data the user has passed into the validation. info'message'
= Overriding message to be displayed for validation (optional). -
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