whenNot method

Formix<T, E> whenNot(
  1. bool condition(
    1. T value
    )
)

Conditionally skips this validator based on condition.

If condition returns true, skips validation and returns valid. Otherwise, runs this validator.

final validator = emailRule.whenNot((value) => value.isEmpty);

Implementation

Formix<T, E> whenNot(bool Function(T value) condition) =>
    WhenNot(condition: condition, validator: this);