CodeIgniter Forums
[REQUEST] Form Validation : Requires Field 1 Or Field 2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: [REQUEST] Form Validation : Requires Field 1 Or Field 2 (/thread-61959.html)



[REQUEST] Form Validation : Requires Field 1 Or Field 2 - Kavatah - 06-04-2015

Hi CI Community.

I need your help figuring out my specific need for my Form Validation rules.

I have a form with several fields.
I need to create three fields with RulesĀ as :
(Field 1 AND Field 2 are Required) OR (Field 3 is required)

For the first group with "AND", I will probably use this extension : http://forum.codeigniter.com/thread-22443-post-143670.html#pid143670

However, I'm not sure how to do the "OR" part.

Any ideas ?

Thank you advance,
Kavatah