FieldValidator class

A utility class providing common field validators.

The FieldValidator class contains static methods for common validation tasks, such as checking if a field is required, validating the length of a string, or ensuring a field is a number or an email address.

Constructors

FieldValidator()

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

fieldLength({int? max, int? min}) ValidatorEvent
Validator to check if a field's length falls within a specified range.
isEmailField() ValidatorEvent
Validator to check if a field contains a valid email address.
isNumberField({int? max, int? min, bool isRequired = false}) ValidatorEvent
Validator to check if a field is a valid number within optional bounds.
requiredField() ValidatorEvent
Validator to check if a field is required (non-null and non-empty).
requiredFieldMultiLanguage() ValidatorEvent
Validator to check if a field is required in multiple languages.