Validating a checkbox in Laravel

prgrm

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.

sam

Try giving the checkbox a value

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related