ValidationRule class
BASE ValidationRule class Define the required details in the constructor to extend and build your own validation rule.
- Implementers
Constructors
- ValidationRule({required String signature, String attribute = "", String title = "Invalid data", String description = ""})
Properties
- attribute ↔ String
-
getter/setter pair
- description ↔ String
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signature ↔ String
-
getter/setter pair
- title ↔ String
-
getter/setter pair
Methods
-
alert(
dynamic context, {ToastNotificationStyleType style = ToastNotificationStyleType.WARNING, Duration? duration}) → 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