Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

laravel validation exists multiple tables laravel

$validator = Validator::make($request->all(), [
    'title' => [
        'required',
        'max:255',
        function($attribute, $value, $fail) {
            if ($value === 'foo') {
                return $fail($attribute.' is invalid.');
            }
        },
    ],
]);
 
PREVIOUS NEXT
Tagged: #laravel #validation #exists #multiple #tables #laravel
ADD COMMENT
Topic
Name
2+8 =