I'm initiating in Laravel.
I searched and not found how to validate data with some ENUM values. On below code I need that type
must be just DEFAULT
or SOCIAL
. One or other:
$validator = Validator::make(Input::only(['username', 'password', 'type']), [
'type' => '', // DEFAULT or SOCIAL values
'username' => 'required|min:6|max:255',
'password' => 'required|min:6|max:255'
]);
Is possible?