NiceValidators class

Common validation rules.

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

custom(String? validator(dynamic value)) NiceValidationRule
Custom comparison.
email({String? message}) NiceValidationRule
String must match email pattern.
maxLength(int max, {String? message}) NiceValidationRule
String must have maximum length.
minLength(int min, {String? message}) NiceValidationRule
String must have minimum length.
pattern(RegExp regex, {String? message}) NiceValidationRule
String must match pattern.
range(num min, num max, {String? message}) NiceValidationRule
Numeric value must be in range.
required({String? message}) NiceValidationRule
Value must not be null or empty.