Validation rule required on multiple select field always fails |
Hello everyone,
I don't know if this is a bug or something that I missed in the upgrade guide from CI2 to CI3, but here goes... My problem is related to validating with the "required" rule a SELECT field that can capture multiple values. The code I was using until I migrated CI3 seemed to work properly, but after I migrated to CI3 it fails to pass an if no data are being send send from the field. If I remove the required validation rule, the whole logic works properly and the data are saved/updated properly in the database. HTML: Code: <select id="groups" name="groups[]" multiple="multiple" > and the validation rule in the PHP controller: PHP Code: $rules = [ I appreciate any help or guidance, thanks. |
Messages In This Thread |
Validation rule required on multiple select field always fails - by Nikos_Kontis - 06-18-2016, 03:11 AM
RE: Validation rule required on multiple select field always fails - by cartalot - 06-18-2016, 01:35 PM
RE: Validation rule required on multiple select field always fails - by Nikos_Kontis - 06-18-2016, 03:00 PM
|