|
Guides (SDK /API) | Technical Reference | BBDN | How-to Documentation |
Code sample project: Custom Pledge Form
Note: For some common regular expressions for field validation, see Microsoft's MSDN article at: How To: Use Regular Expressions to Constrain Input in ASP.NET. There are also some default regular expressions in the editor for the ValidationExpression field on the Properties window for the RegularExpressionValidator control.
Add a regular expression validator to ensure that TextBoxEmail has a valid email address.
<asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" ControlToValidate="TextBoxEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" runat="server" ErrorMessage=" Invalid email address"></asp:RegularExpressionValidator>