Commit 9cd047c
authored
[10.x] Escape forward slashes when exploding wildcard rules (#48936)
* Escape forward slashes when exploding wildcard rules
Array keys with a forward slash '/' passed into the validator will cause a preg_match(): Unknown modifier exception if they are validated using a rule keyed with a wildcard '*'
This is due to the pattern being terminated early by the existence of the '/' in the pattern variable, this same fix is also used in Validator.php
* Add test
* Fix for continuous integration style1 parent fe2ac4a commit 9cd047c
File tree
2 files changed
+23
-1
lines changed- src/Illuminate/Validation
- tests/Validation
2 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
202 | 224 | | |
203 | 225 | | |
204 | 226 | | |
| |||
0 commit comments