I need to make a validation on a form that is already in use and have 3 different validation functions already (the highlight, error pop up and bulleted error message at the top of the page) if they do not fill everything out correctly.

However I now need to add in a new validation for the mobile field. If they input an invalid mobile number or leave it blank it will come up with an error message next to the field.

If they input it all correctly it will then go through and “mobile=true” will appear at the end of the url.

Here is what the mobile field looks like in code:

Code:
<div class="element">

<span class="invalid"></span>

<label for="mobile_number">Mobile:**</label>

<input name="mobileNumber" type="text" id="mobile_number" title="Please enter at least one number" class="text validate {validate:{minLength:10, eitherOr:'#telephone_number', messages:{minLength:'Please enter a valid phone number (at least @NUM digits long)', eitherOr:'Please enter either your Telephone or Mobile number'}}}" />

</div>
We are also using a backend called FRESCA which it needs to be compatible with. Can anyone help with this?