notIn
Checks that the given value is not in the given list of values
V::notIn($value, $notIn): bool
Parameters
Name | Type | Default |
---|---|---|
$valuerequired | mixed |
no default value |
$notInrequired | mixed |
no default value |
Return type
bool
In your code
if (V::notIn('A', ['B', 'C', 'D'])) {
echo 'Yay, valid!';
}
In fields
fields:
example:
label: Example field
type: text
validate:
notIn:
- B
- C
- D