IsInEnumValidation<T extends Object> extension

Extension to validate that a value is one of a set of allowed values, typically the values of an enum.

on

Methods

isInEnum(List<T> values, {String? message, String? code}) → SimpleValidationBuilder<T>

Available on SimpleValidationBuilder<T>, provided by the IsInEnumValidation extension

Adds a validation rule that checks if the value is contained in values.