关于邮件地址的测试

Valid Email addressReason
email@domain.comValid email
firstname.lastname@domain.comEmail contains dot in the address field
email@subdomain.domain.comEmail contains dot with subdomain
firstname+lastname@domain.comPlus sign is considered valid character
email@123.123.123.123Domain is valid IP address
email@[123.123.123.123]Square bracket around IP address is considered valid
"email"@domain.comQuotes around email is considered valid
1234567890@domain.comDigits in address are valid
email@domain-one.comDash in domain name is valid
_______@domain.comUnderscore in the address field is valid
email@domain.name.name is valid Top Level Domain name
email@domain.co.jpDot in Top Level Domain name also considered valid (use co.jp as example here)
firstname-lastname@domain.comDash in address field is valid
john.smith(commect)@example.com 
(commect)john.smith@example.com 
john.smith@(comment)example.com 
john.smith@example.com(comment) 


Invalid Email addressReason
plainaddressMissing @ sign and domain
#@%^%#$@#$@#.comGarbage
@domain.comMissing username
Joe Smith <email@domain.com>Encoded html within email is invalid
email.domain.comMissing @
email@domain@domain.comTwo @ sign
.email@domain.comLeading dot in address is not allowed
email.@domain.comTrailing dot in address is not allowed
email..email@domain.comMultiple dots
あいうえお@domain.comUnicode char as address
email@domain.com (Joe Smith)Text followed email is not allowed
email@domainMissing top level domain (.com/.net/.org/etc)
email@-domain.comLeading dash in front of domain is invalid
email@domain.web.web is not a valid top level domain
email@111.222.333.44444Invalid IP format
email@domain..comMultiple dot in the domain portion is invalid
just"not"right@example.comquoted strings must be dot separated, or the only element making up the local-part
this is"not\allowed@example.comspaces, quotes, and backslashes may only exist when within quoted strings and preceded by a backslash
this\ still\"not\\allowed@example.comeven if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes

Reference link : http://en.wikipedia.org/wiki/Email_address#Domain_part


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值