Laravel - Validation - Rule Not In

The field under validation must not be included in the given list of values. The Rule::notIn method may be used to fluently construct the rule:

    
    use Illuminate\Validation\Rule;
    
    Validator::make($data, [
        'toppings' => [
            'required',
            Rule::notIn(['sprinkles', 'cherries']),
        ],
    ]);