ValidationRule class

A validation rule for form fields.

Constructors

ValidationRule(String? validator(String?))
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validator String? Function(String?)
final

Methods

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

Static Methods

email([String message = 'Enter a valid email address']) ValidationRule
minLength(int length, [String? message]) ValidationRule
required([String message = 'This field is required']) ValidationRule