InList<T> constructor

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

Creates a new instance of the InList validation rule.

  • validValues: The list of valid values (required).
  • message: A custom validation message (optional) to be displayed when the validation fails.

Implementation

InList(this.validValues, {String? message}) : super(message);