Skip to content

Instantly share code, notes, and snippets.

@markwainwright
Last active April 29, 2019 21:36
Show Gist options
  • Save markwainwright/71660a428e4ca1e9c239 to your computer and use it in GitHub Desktop.
Save markwainwright/71660a428e4ca1e9c239 to your computer and use it in GitHub Desktop.
<script>
// Change the message when required field is empty. Replace `your_name` with your form field ID.
window.ub.form.validationMessages.your_name.required = 'You forgot to enter your name!';
// Change the message when email address field is invalid. Replace `your_email_address` with your form field ID.
window.ub.form.validationMessages.your_email_address.email = "That doesn't seem to be a valid email!";
// Change the message when phone number field is invalid. Replace `your_phone_number` with your form field ID.
window.ub.form.validationMessages.your_phone_number.phone = "That doesn't seem to be a valid phone number!";
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment