$this->validator->getValidated() looks stupid and unnecessary |
(10-15-2023, 03:19 PM)kenjis Wrote: @MrWhite The problem is when use in_list type validation rules for optional checkboxes, the validator always expect a value to be submitted. if the form submitted with the checkbox unchecked then the validation will fail. I think it should not happen. non submitted inputs should be ignored. to mitigate this issue, we have to use input hidden for all the optional inputs. I think it's a dirty way of handling things. Here is one of my ci4 apps example. validation rule ![]() the view ![]() The validation will pass if i submit the form with checkbox checked. if not validation will fail. I have double checked that, there is no hidden input field for the checkbox. Don't you think this is a issue? If im mistaken, please help me. thanks for your time ![]() |
Welcome Guest, Not a member yet? Register Sign In |