mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 18:40:49 +00:00
validattion: add test case for email valid
This commit is contained in:
parent
d41f4c0a3a
commit
b34853f8cc
@ -214,6 +214,12 @@ func TestEmail(t *testing.T) {
|
||||
if !valid.Email("suchuangji@gmail.com", "email").Ok {
|
||||
t.Error("\"suchuangji@gmail.com\" is a valid email address should be true")
|
||||
}
|
||||
if valid.Email("@suchuangji@gmail.com", "email").Ok {
|
||||
t.Error("\"@suchuangji@gmail.com\" is a valid email address should be false")
|
||||
}
|
||||
if valid.Email("@suchuangji@gmail.com", "email").Ok {
|
||||
t.Error("\"suchuangji@gmail.com ok\" is a valid email address should be false")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIP(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user