Fix lint and format code in core dir

This commit is contained in:
loyalsoldier
2021-06-06 21:00:27 +08:00
parent ca328208cc
commit 41790b80ac
42 changed files with 75 additions and 109 deletions

View File

@@ -235,8 +235,11 @@ func (v *Validation) Tel(obj interface{}, key string) *Result {
// Phone Test that the obj is chinese mobile or telephone number if type is string
func (v *Validation) Phone(obj interface{}, key string) *Result {
return v.apply(Phone{Mobile{Match: Match{Regexp: mobilePattern}},
Tel{Match: Match{Regexp: telPattern}}, key}, obj)
return v.apply(Phone{
Mobile{Match: Match{Regexp: mobilePattern}},
Tel{Match: Match{Regexp: telPattern}},
key,
}, obj)
}
// ZipCode Test that the obj is chinese zip code if type is string

View File

@@ -605,7 +605,6 @@ func TestCanSkipAlso(t *testing.T) {
if !b {
t.Fatal("validation should be passed")
}
}
func TestFieldNoEmpty(t *testing.T) {