ValidationRules class

Pre-built validation rules for common use cases.

Constructors

ValidationRules()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

creditCard({String? message}) FieldRule
Credit card validation rule (Luhn algorithm).
date({String? message}) FieldRule
Date validation rule (YYYY-MM-DD).
email({String? message}) FieldRule
Email validation rule.
hexColor({String? message}) FieldRule
Hex color validation rule.
ipAddress({String? message}) FieldRule
IP address validation rule.
json({String? message}) AsyncFieldRule
JSON validation rule (async).
passwordStrength({String? message}) FieldRule
Password strength validation rule.
phone({String? message}) FieldRule
Phone number validation rule.
unique({required Future<bool> checkUnique(dynamic value), String? message}) AsyncFieldRule
Unique value validation rule (async).
url({String? message}) FieldRule
URL validation rule.
username({String? message}) FieldRule
Username validation rule.
uuid({String? message}) FieldRule
UUID validation rule.