FormioValidators class
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
Static Methods
-
combine(List<String? Function()> validators)
→ String?
-
Combines multiple validators into one.
-
compareFields(dynamic value, dynamic otherFieldValue, String operator, String fieldName, String otherFieldName)
→ String?
-
Cross-field validation - compare two fields with a comparison operator.
-
crossFieldValidator({required dynamic value, required Map<String, dynamic> formData, required String fieldKey, required String compareFieldKey, required String operator, String? message})
→ String?
-
Creates a cross-field validator that compares two fields.
-
customJS(String? value, String jsCode, Map<String, dynamic> formData, {String? fieldName})
→ String?
-
Custom JavaScript validation.
-
dateRange(DateTime? value, DateTime? minDate, DateTime? maxDate, {String? fieldName})
→ String?
-
Validates date range.
-
email(String? value, {String? message})
→ String?
-
Validates email format.
-
filePattern(String? fileName, String pattern, {String? message})
→ String?
-
Validates file type/pattern.
-
fileSize(int? sizeBytes, {int? minSize, int? maxSize, String? fieldName})
→ String?
-
Validates file size (in bytes).
-
fromConfig(Map<String, dynamic>? validateConfig, String fieldName, {Map<String, dynamic>? formData})
→ String? Function(String?)?
-
Creates a validator function from Form.io validation config.
-
json(String? value, {String? message})
→ String?
-
Validates that a string contains only valid JSON.
-
matchField(String? value, dynamic otherFieldValue, String fieldName, String otherFieldName)
→ String?
-
Validates that a field matches another field (e.g., password confirmation).
-
max(num? value, num maxValue, {String? fieldName})
→ String?
-
Validates maximum numeric value.
-
maxDate(DateTime? value, DateTime maxDate, {String? fieldName})
→ String?
-
Validates maximum date.
-
maxLength(String? value, int max, {String? fieldName})
→ String?
-
Validates maximum string length.
-
maxWords(String? value, int max, {String? fieldName})
→ String?
-
Validates maximum word count.
-
maxYear(DateTime? value, int maxYear, {String? fieldName})
→ String?
-
Validates maximum year.
-
min(num? value, num minValue, {String? fieldName})
→ String?
-
Validates minimum numeric value.
-
minDate(DateTime? value, DateTime minDate, {String? fieldName})
→ String?
-
Validates minimum date.
-
minLength(String? value, int min, {String? fieldName})
→ String?
-
Validates minimum string length.
-
minWords(String? value, int min, {String? fieldName})
→ String?
-
Validates minimum word count.
-
minYear(DateTime? value, int minYear, {String? fieldName})
→ String?
-
Validates minimum year.
-
pattern(String? value, String pattern, {String? message})
→ String?
-
Validates that a string matches a regex pattern.
-
required(dynamic value, {String? fieldName})
→ String?
-
Validates that a field is not empty if required.
-
url(String? value, {String? message})
→ String?
-
Validates URL format.