Forced Field Validation



Show first post

53 replies

Of course - here’s the URL. It’s page 2 of a multi-step form. I’m just looking to have the DOB form make sure users enter it as MM/DD/YYYY, since that’s how the data needs to be fed into the CRM system.

https://quote.t65medicareenroll.com/step-two-1/

Here’s the URL for the first page in the group, just for reference.

https://quote.t65medicareenroll.com/get-started-1/

Userlevel 5

Okay I think there is an issue with the old jQuery. Try using this script instead.

<script>
window.ub.form.customValidators.validatedob = {
isValid: function(value) {
  return /^([0-9]{2})\/([0-9]{2})\/([0-9]{4})$/.test(value);
},
message: 'Please enter a date in this format: MM/DD/YYYY',
};
</script>
<script>
window.ub.form.validationRules.date_of_birth.validatedob = true;
</script>

Referencing this post in the community:

Thank you! It looks like it’s working now when I preview the page!

Reply