Home Forums Newsletter Plugin Support validate e-mail pattern for input-field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #301939
    Anonymous
    Inactive

    Hello,

    i’m using the plug-in with a custom HTML subscription-form on my site. However, the validation isn’t a 100%, since it only checks if there’s an @ entered. It should check for a dot as well or better, a valid domain/ccTLD at the end. Is that somehow possible?

    For example, it’s still possible to just enter “asdasd@asdasd” and get a “Registration failed” message after clicking on subscripe, i’d rather like it to prevent sending of the form in the first step though.

    Thank you guys in advance for any kind of help or solution to this issue.

    #301941
    Stefano
    Keymaster

    Hi, that is the standard HTML 5 validator, for a more strict validation you should add some javascript. You could add to the field a pattern, to validate the input with a regular expression:

    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#pattern

    Anyway, remember that subscribers usually do not enter a wrong email address, it should not be a real problem.

    The read problem is when the mistype the address, for example something @ gnail.com or something @ gamil.com… 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.