Merge pull request #235 from moogle19/master

Add unicode email tests
pull/238/head
Dean Karn 9 years ago
commit bd356b6899
  1. 20
      validator_test.go

@ -5280,6 +5280,26 @@ func TestEmail(t *testing.T) {
errs := validate.Field(s, "email") errs := validate.Field(s, "email")
Equal(t, errs, nil) Equal(t, errs, nil)
s = "Dörte@Sörensen.example.com"
errs = validate.Field(s, "email")
Equal(t, errs, nil)
s = "θσερ@εχαμπλε.ψομ"
errs = validate.Field(s, "email")
Equal(t, errs, nil)
s = "юзер@екзампл.ком"
errs = validate.Field(s, "email")
Equal(t, errs, nil)
s = "उपयगकर@उदहरण.कम"
errs = validate.Field(s, "email")
Equal(t, errs, nil)
s = "用户@例子.广告"
errs = validate.Field(s, "email")
Equal(t, errs, nil)
s = "" s = ""
errs = validate.Field(s, "email") errs = validate.Field(s, "email")
NotEqual(t, errs, nil) NotEqual(t, errs, nil)

Loading…
Cancel
Save