CheckboxList ->in() validation not working
Hey,
Using what's on the docs I have the following code with different values:
When using the in validation rule and calling
getState
the field returns an error "is invalid"
When removing this rule I have no errors and every other fields are working as expected
Worth noting that I have radios with the same code and those are working as expected
Thx for any help!4 Replies
found out that CheckboxList is not considered an array until adding a rule related to arrays as such as
->minItems(1)
I probably should open an issue but don't really know how to fix this rnJust ran into this issue too. Seems like a Laravel thing to only consider it an array if an array related rule is added. Wow
Did you cast the value to an array?
yeah I did, problem is in validation rules
I dumped them and it missed the array rule