Template:Email/Verify/Doc
From PCSAR
The template {{Email/Verify|email address|text|template=templatename}}
verifies that the supplied email address
appears to be a email address.
This is typically used in other templates to report if they've been passed something that is not an email address.
The optional
text
will be used if everything is alright.
If there is a problem, an error message is displayed and the page is put in Category:Email Error. Currently obvious checks for invalid e-mail addresses (like bad or missing characters) are not implemented.
The optional
templatename
is used as the name of the template in the error message.
So if Template:email calls this {{Email/Verify|...
the errors can be reported in terms of {{email|...
.
You type... | You get... | |
---|---|---|
{{Email/Verify|name@example.com}} | ||
{{Email/Verify|name@example.com|[mailto:name@example.com name@example.com]}} | name@example.com | |
{{Email/Verify}} |
| |
{{Email/Verify|}} |
| |
{{Email/Verify|not an address}} | ||
{{Email/Verify|not an address|template=email}} |