Support the ongoing development of Laravel.io →
Eloquent Views Validation
Last updated 2 years ago.
0

The 'sometimes' part might make it so that if you do not select anything, it treats it as not required?

Have you tried this? Maybe this will allow you to keep the sometimes: http://stackoverflow.com/questions/21375876/validating-radio-buttons-in-laravel-4

Last updated 2 years ago.
0

yup tried that...still ignores it. the same thing was happening to my checkbox and this fixed it:

{{ Form::hidden('termsAgree', false) }}
{{ Form::checkbox('termsAgree', 'yes')}}

just putting that hidden field before it makes it validate and not be ignored.

reference: http://nielson.io/2014/02/handling-checkbox-input-in-laravel/

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

anthonycha anthonycha Joined 22 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.