Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel array validation

use IlluminateSupportFacadesValidator;

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

Validator::make($input, [
    'user' => 'array:username,locale',
]);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #array #validation
ADD COMMENT
Topic
Name
8+1 =