Answers for "laravel validate enum field"

PHP
1

laravel validate enum field

$validator = Validator::make(Input::only(['username', 'password', 'type']), [
    'type' => 'in:DEFAULT,SOCIAL', // DEFAULT or SOCIAL values
    'username' => 'required|min:6|max:255',
    'password' => 'required|min:6|max:255'
]);
Posted by: Guest on August-24-2021

Code answers related to "laravel validate enum field"

Browse Popular Code Answers by Language