inList<T> static method

ValidationRule<T> inList<T>(
  1. List<T> validValues, {
  2. String? message,
})

Creates an InList validation rule.

This rule checks if a value is in the list of validValues. It can include a custom validation message.

Implementation

static ValidationRule<T> inList<T>(List<T> validValues, {String? message}) =>
    InList(validValues, message: message);