CodeIgniter Forums
Validation is related to the other fields - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Validation is related to the other fields (/showthread.php?tid=77158)



Validation is related to the other fields - mylastof - 07-26-2020

How do you validate the form if it is related to other input fields?
Example:
When field A have value = "YES", field B = required
when field A have value other "YES", field B = not required


RE: Validation is related to the other fields - jreklund - 07-27-2020

You will need to create your own custom rule.