Tuesday, March 7, 2017

Validating a checkbox in Laravel

I have a form with a checkbox:

        <input id="check_agb" type="checkbox" value name="check_agb">

It is a needed field so I set this:

 return Validator::make($data, [
...
'check_agb' => 'required',
...
]);

However it never gets validated.



via prgrm

Advertisement