CustomValidator<I> constructor

CustomValidator<I>({
  1. required _MessageBuilder<I> message,
  2. required _Validator<I> isValid,
  3. String? fieldName,
  4. bool ignoreNullable = true,
})

Implementation

CustomValidator({
  required _MessageBuilder<I> message,
  required _Validator<I> isValid,
  String? fieldName,
  bool ignoreNullable = true,
}) : this.withMessage(
        isValid: isValid,
        ignoreNullable: ignoreNullable,
        message: (value) => '${fieldName ?? 'Field'} ${message(value)}',
      );