Answers for "laravel validation rules array"

PHP
2

laravel validate integer between

'item' => 'required|integer|between:1,10',
Posted by: Guest on October-21-2020
1

laravel validation array

$data = $request->validate([
    "name"    => "required|array|min:3",
    "name.*"  => "required|string",
]);
Posted by: Guest on June-08-2021
2

validate each value from array laravel

$validator = Validator::make($request->all(), [
    "names"    => "required|array|min:3",
    "names.*"  => "required|string|distinct|min:3",
]);
Posted by: Guest on November-12-2020
0

laravel validation

Validator::extend('foo', 'FooValidator@validate');
Posted by: Guest on December-25-2020
-1

laravel array validation

use Illuminate\Support\Facades\Validator;

$input = [
    'user' => [
        'name' => 'Taylor Otwell',
        'username' => 'taylorotwell',
        'admin' => true,
    ],
];

Validator::make($input, [
    'user' => 'array:username,locale',
]);
Posted by: Guest on August-15-2021

Code answers related to "laravel validation rules array"

Browse Popular Code Answers by Language