In my controller i'm doing some validation like :
$this->validate(request(), [ 'add_button' => 'required|integer|notIn:'.$requested_by ], [ 'notIn' => 'This value has to be different' ]);
...this is in reference to the following format :
$this->validate($request, $rules, $customMessages);
So, i'm using the "notIn" validator to check that the "add_button" value is not equal to "$requested_by"
Though the validation works, but the custom message is not not displayed. On the contrary, if i put a custom validation message for "required" or something like "max" - then the custom validation message is displayed just fine.
Where am i going wrong?
Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.