AnsweredAssumed Answered

Trying to add validation to the default Email text box with Custom JS

Question asked by Simon Millar on Nov 28, 2018
Latest reply on Dec 10, 2018 by Simon Millar

Hi All,

 

   We have a requirement to add additional formatting rules to the email passed through the registration page. We need to confirm that the email has our domain name and is not using a particular uid. 

 

   I have created my own html text input, set the Catalog email text box display to none and want to pass through the only the input that meets our requirements. I would like to the default error messages to invoke as usual when an invalid email is passed. I find I can populate the field with .value, but don't get the error message.

 

I have set

 

emailInputElement.style.display="none";
emailInputElement.tabIndex=-1;

....

emailInputElement.value = " ";
emailInputElement.click();

anotherElementWithFocus.focus();

Any recommendations?

Thanks,
Simon

Outcomes