custom static method
A rule of your own: check returns an error message, or null when the
value passes; name keys its translations.
Implementation
static Rule custom(
FutureOr<String?> Function(ValidationContext context) check, {
String name = 'custom',
}) => ClosureRule(check, name: name);