Jump to content

Validating an email address: Difference between revisions

From NusaATK
Mark (talk | contribs)
No edit summary
 
Mark (talk | contribs)
No edit summary
Line 1: Line 1:
{{howto|Easy|[[Mark Wittens]] <mark@ibuildings.nl>}}
{{howto|Easy|[[Mark Wittens]] <mark@ibuildings.nl>}}
The validation of an email address is easy, just add the email attribute to the node with the email address like this:
<syntaxhighlight lang="php">
$this->add(new atkEmailAttribute("email", false, AF_OBLIGATORY));
</syntaxhighlight>
The atkEmailAttribute contains a validation for an email address which will be called automatically, if the second parameter of the constructor is set to "true" a DNS check will be performed on the address domain as well.

Revision as of 14:59, 14 May 2007

ATK Howto: Validating an email address

Complexity: Easy
Author: Mark Wittens <mark@ibuildings.nl>

List of other Howto's

The validation of an email address is easy, just add the email attribute to the node with the email address like this:

 $this->add(new atkEmailAttribute("email", false, AF_OBLIGATORY));

The atkEmailAttribute contains a validation for an email address which will be called automatically, if the second parameter of the constructor is set to "true" a DNS check will be performed on the address domain as well.