The Validate tag whose type is set to "email" is referred to as an Email Validator and is used to ensure the value of the target control matches the form of a valid email address. It does not validate the email account is valid or active.
<Validate
BackColor="color name|#dddddd"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset"
BorderWidth="size"
CssClass="string"
Display="Static|Dynamic"
EnableClientScript="True|False"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
Height="size"
Message="string"
Target="string"
Text="string"
Type="Email"
Width="size"
/>
When the "type" attribute is set to email, the control prevents the form from being submitted if its associated control's value does not match the pattern of a properly formed email address. It does not validate the email account is active or valid. The Email Validator is a handy short-cut. It uses a built-in pattern that should validate most forms of email address. If you find it insufficient for specific situations, you can always use the RegularExpression Validator and use your own pattern.
You associate a control with the <validate>
tag by setting its "target" attribute to the ID of the control you wish to validate. The "message" attribute is the text that will be displayed to the user when validation fails. If you are using the <validationsummary>
tag, then you can also supply a "text" attribute. When validation fails, the "text" will be displayed where your <validate>
tag is and the "message" will be displayed in the <validationsummary>
.
<addform>
...
<table>
<tr>
<td>
<label for="txtEmail" text="Email" />
<textbox id="txtEmail" datafield="Email"
datatype="string" />
<validate type="email" target="txtEmail" message="Please enter a valid email address" />
</td>
</tr>
<tr>
<td colspan="2">
<addbutton text="Add"/> <cancelbutton
text="Cancel"/>
</td>
</tr>
</table>
</addform>