File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,12 @@ public function __construct($tldCheck = true)
29
29
new Alnum ('- ' ),
30
30
new Not (new StartsWith ('- ' )),
31
31
new OneOf (
32
- new Not (
33
- new Contains ('-- ' )
34
- ),
35
- new AllOf (
36
- new StartsWith ('xn-- ' ),
37
- new Callback (function ($ str ) {
38
- return substr_count ($ str , '-- ' ) == 1 ;
39
- })
40
- )
41
- )
32
+ new Not (new Contains ('-- ' )),
33
+ new Callback (function ($ str ) {
34
+ return substr_count ($ str , '-- ' ) == 1 ;
35
+ })
36
+ ),
37
+ new Not (new EndsWith ('- ' ))
42
38
);
43
39
}
44
40
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ public function providerForDomain()
67
67
['xn--bcher-kva.ch ' ],
68
68
['mail.xn--bcher-kva.ch ' ],
69
69
['example-hyphen.com ' ],
70
+ ['example--valid.com ' ],
71
+ ['std--a.com ' ],
72
+ ['r--w.com ' ],
70
73
];
71
74
}
72
75
@@ -76,10 +79,10 @@ public function providerForNotDomain()
76
79
[null ],
77
80
['' ],
78
81
['2222222domain.local ' ],
79
- ['example--invalid.com ' ],
80
82
['-example-invalid.com ' ],
81
83
['example.invalid.-com ' ],
82
84
['xn--bcher--kva.ch ' ],
85
+ ['example.invalid-.com ' ],
83
86
['1.2.3.256 ' ],
84
87
['1.2.3.4 ' ],
85
88
];
You can’t perform that action at this time.
0 commit comments