custom static method

Validator custom(
  1. String? validator(
    1. String? value
    )
)

Adds a custom inline validator.

FormRules.custom((val) => val == 'secret' ? null : 'No').build()

Implementation

static Validator custom(String? Function(String? value) validator) =>
    Validator._()..custom(validator);