FieldValidator<I> constructor

const FieldValidator<I>({
  1. String? fieldName,
  2. required String message,
  3. bool ignoreNullable = true,
})

Defines fieldName and message that will be used to generate validation error message if validation fails.

Implementation

const FieldValidator({
  String? fieldName,
  required String message,
  this.ignoreNullable = true,
}) : message = '${fieldName ?? 'Field'} $message';