How to Check if a Value is Not Equal to a set of Characters in Laravel Validation
In this lesson, we will see how to check if a value is not equal to a set of characters in Laravel validation, sometimes when working on a Laravel project you want a field to be different from a set of characters using validation, so let's see how we can do that.
Use laravel not_in validation rule
So to do that we use Laravel not_in validation rule here is an example:
return [
'name_en' => 'required|not_in:<p></p>'
];