Email verification in vform

2008-09-19, 15:29 by Erik Dahl in RXML/XSLT

How it works:

  • Verfies the email adress according to string patterns. Valid email string patterns could be of this format and probably many more:
    • erikd@foo.com
    • Erik Dahl <erikd@foo.com>
    • Erik Dahl <"erikd@foo.com">
  • Verifies that the domain part of the email address has a MX record - meaning that the <vinput type="email"/> does a domain name look-up.
  • Domain name look-up can be disabled in the tag using the disable-domain-check="yes" attribute in the <vinput/> tag.

Code example:

  <vform method="post">
      <label for="e_mail">Email</label>
      <vinput type="email" name="email" id="e_mail">
         * Incorrect email address
      </vinput>
      <br/>
      <input type="submit"/>
    </vform>
    <then>
      <span style="color: green;">OK</span>
      <div></div>
    </then>

 

Can you use + sign in verfied input tag (<vinput/>)?

I got this question on the Roxen User Conference while talking about the Newsletter module.

Yes it will verify if you the user supplies erik+roxen-blog@foo.com.

It was a valid question since apperently this format is used in order to directly mail coming from the subscription of the newsletter in separate folders directly.

 

You need to log in to post comments.

 

Sep 19, 2017

Categories

HTML/CSS (1)
Pike (0)
RXML/XSLT (4)

Latest comments