title: Formvalidation.io - Validate fields based on value of other fields
body: <p>I have been trying to find the solution to this for some time now but I am not having much luck.  I'm sure the solution is simple so thanks in advance for the help!</p>
  
  <p>I am using the formvalidation io plugin and have it working perfectly on multiple forms.  I have another large form that I want to validate a customer's name.  I have 3 fields (CompanyName, FirstName, &amp; LastName) in the form and I want to validate based on the following rules:</p>
  
  <ul>
  <li>CompanyName or FirstName &amp; LastName Required</li>
  <li>If no Company Name is entered the both FirstName &amp; LastName are required</li>
  <li>If CompanyName is entered then FirstName &amp; LastName are not required but either can have a value</li>
  </ul>
  
  <p>Hopefully that all makes sense.  I have figured out how to use a hidden field to require both FirstName and LastName to be entered (<a href="http://formvalidation.io/examples/validating-multiple-inputs-one/" rel="nofollow noreferrer">Valdiating multiple inputs as one</a>).  I'm sure this will require some sort of conditional validation (<a href="http://formvalidation.io/examples/conditional-validation/" rel="nofollow noreferrer">Conditional Validation</a>) to accomplish this but I'm not sure how to implement.</p>
  
  <p>Does anyone have any experience accomplishing something like this?  As I said, thanks in advance.</p>