0
In Codeigniter there is the possibility to create rules (Rules) validation for each form field, but what I need is a validation between two fields. I explain:
The form has a field called url
which is only obligatory if the flag correspondent is selected.
I do not know if in Codeigniter you can do this, because it is a validation on the Client’s side (possibly even gives). If you cannot try javascript/jquery
– CesarMiguel
With javascript is easier to do and is proto even, but it is good to have a validation in the backend as well.
– LuisComS
As @Luiscoms commented, I also believe that the ideal is to have validation on both sides. In client-side you can prevent a form from being submitted with errors, avoiding unnecessary processing on the server-side; and on the server-side, to prevent a possible bug in client-side validation from being exploited.
– Rodrigo Rigotti