custom static method

ValidationRule custom(
  1. ValidationFunction func, {
  2. required String message,
})

Creates a custom validation rule using the given func.

The message is returned if validation fails.

Implementation

static ValidationRule custom(
  ValidationFunction func, {
  required String message,
}) {
  return ValidationRule(func, message);
}