J
J
jazzus2019-02-19 05:43:34
Laravel
jazzus, 2019-02-19 05:43:34

Why doesn't it output the validator message for Rule::notIn?

rule

$rules = [
          'role' => [
            Rule::notIn([КОД])
          ]
      ];

Message
$messages = [
          'role.notIn' => 'Отказ',
      ];

Return
The selected role is invalid.
And I didn't write it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yurik Bulkin, 2019-02-19
@jazzus

https://laravel.com/docs/5.5/validation#rule-not-in

$messages = [
          'role.not_in' => 'Отказ',
];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question