Email Address Validation for ASP.NET

前端 未结 8 864
梦如初夏
梦如初夏 2020-12-01 13:45

What do you use to validate an email address on a ASP.NET form. I want to make sure that it contains no XSS exploits.

This is ASP.NET 1.1

8条回答
  •  旧时难觅i
    2020-12-01 14:21

    In our code we have a specific validator inherited from the BaseValidator class.

    This class does the following:

    1. Validates the e-mail address against a regular expression.
    2. Does a lookup on the MX record for the domain to make sure there is at least a server to deliver to.

    This is the closest you can get to validation without actually sending the person an e-mail confirmation link.

提交回复
热议问题