1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-13 08:23:32 +00:00

validation: fix email valid

This commit is contained in:
miraclesu 2017-03-12 19:23:46 +08:00
parent c5f838e785
commit d41f4c0a3a

View File

@ -518,7 +518,7 @@ func (a AlphaDash) GetLimitValue() interface{} {
return nil
}
var emailPattern = regexp.MustCompile("[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?")
var emailPattern = regexp.MustCompile("^[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[a-zA-Z0-9](?:[\\w-]*[\\w])?$")
// Email check struct
type Email struct {