laravel validate enum field

Solutions on MaxInterview for laravel validate enum field by the best coders in the world

showing results for - "laravel validate enum field"
Leah
15 May 2019
1$validator = Validator::make(Input::only(['username', 'password', 'type']), [
2    'type' => 'in:DEFAULT,SOCIAL', // DEFAULT or SOCIAL values
3    'username' => 'required|min:6|max:255',
4    'password' => 'required|min:6|max:255'
5]);
6