Mobile custom field validation

Hi,

I'm using Sign up forms to create a "Copy/paste a form to your site" signup form.

I have a custom mobile number field that I would like to validate as a number.

I can get it to validate if there is no data entered in the field.

<label for="fieldiilthty">mobile</label><br />
<input id="fieldiilthty" name="cm-f-iililkj" type="text" required />

Is there a way to check if the data entered is a number?

Thanks

Wayne

balthazar balthazar, 2 years ago

Hello Wayne! First, I'd recommend taking a look at this article we have about adding validation to a form. The example we give is for validating the email address, but you can find JavaScript to validate phone numbers. I hope that gets you pointed in the right direction!

DesWork, 2 years ago

Thanks balthazar,

Managed to get it validating using the article example.

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free
1-888-533-8098