@@ -14,13 +14,13 @@ import (
14
14
// with an "@" symbol in, and a "." in the second host part of the email address.
15
15
func (node * AssertNode ) IsEmail (msgAndArgs ... interface {}) {
16
16
node .t .Helper ()
17
- node .IsString ().IsEmail (msgAndArgs ... )
17
+ node .IsString ().WithEmail (msgAndArgs ... )
18
18
}
19
19
20
- // IsEmail asserts that the JSON node has a string value with email.
20
+ // WithEmail asserts that the JSON node has a string value with email.
21
21
// Validation is based on simplified pattern. It allows all values
22
22
// with an "@" symbol in, and a "." in the second host part of the email address.
23
- func (a * StringAssertion ) IsEmail (msgAndArgs ... interface {}) * StringAssertion {
23
+ func (a * StringAssertion ) WithEmail (msgAndArgs ... interface {}) * StringAssertion {
24
24
if a == nil {
25
25
return nil
26
26
}
@@ -44,12 +44,12 @@ func (a *StringAssertion) IsEmail(msgAndArgs ...interface{}) *StringAssertion {
44
44
// pattern for HTML5 (see https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
45
45
func (node * AssertNode ) IsHTML5Email (msgAndArgs ... interface {}) {
46
46
node .t .Helper ()
47
- node .IsString ().IsHTML5Email (msgAndArgs ... )
47
+ node .IsString ().WithHTML5Email (msgAndArgs ... )
48
48
}
49
49
50
- // IsHTML5Email asserts that the JSON node has a string value with email. Validation is based on
50
+ // WithHTML5Email asserts that the JSON node has a string value with email. Validation is based on
51
51
// pattern for HTML5 (see https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
52
- func (a * StringAssertion ) IsHTML5Email (msgAndArgs ... interface {}) * StringAssertion {
52
+ func (a * StringAssertion ) WithHTML5Email (msgAndArgs ... interface {}) * StringAssertion {
53
53
if a == nil {
54
54
return nil
55
55
}
@@ -72,11 +72,11 @@ func (a *StringAssertion) IsHTML5Email(msgAndArgs ...interface{}) *StringAsserti
72
72
// IsURL asserts that the JSON node has a string value with URL.
73
73
func (node * AssertNode ) IsURL (msgAndArgs ... interface {}) * URLAssertion {
74
74
node .t .Helper ()
75
- return node .IsString ().IsURL (msgAndArgs ... )
75
+ return node .IsString ().WithURL (msgAndArgs ... )
76
76
}
77
77
78
- // IsURL asserts that the JSON node has a string value with URL.
79
- func (a * StringAssertion ) IsURL (msgAndArgs ... interface {}) * URLAssertion {
78
+ // WithURL asserts that the JSON node has a string value with URL.
79
+ func (a * StringAssertion ) WithURL (msgAndArgs ... interface {}) * URLAssertion {
80
80
if a == nil {
81
81
return nil
82
82
}
0 commit comments