inList static method
Ensures the string is one of the allowed values.
Implementation
static String? Function(String?) inList(
Iterable<String> allowed, {
String errorMessage = 'Value is not allowed',
}) {
return _build(errorMessage, (v) => isIn(v, allowed));
}