Using the Jquery validation plugin, I was curious to know if there is some sort of in-built functionality to have a “one of the two” is mandatory check. e.g: Email or mobile number is mandatory?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ok serves me right for not googling enough.
To answer the question, by default No apparently it’s not, but it isn’t too difficult to write a custom rule either.
Rebecca has posted a solution on her blog at http://blog.rebeccamurphey.com/2009/04/15/jquery-validation-indicate-that-at-least-one-element-in-a-group-is-required/