We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0fa197 commit e1a0556Copy full SHA for e1a0556
app/code/Magento/Customer/Model/Validator/City.php
@@ -20,10 +20,16 @@ class City extends AbstractValidator
20
*
21
* \p{L}: Unicode letters.
22
* \p{M}: Unicode marks (diacritic marks, accents, etc.).
23
- * ': Apostrophe mark.
+ * \d: Digits (0-9).
24
* \s: Whitespace characters (spaces, tabs, newlines, etc.).
25
+ * -: Hyphen.
26
+ * ': Apostrophe mark.
27
+ * .: Period/full stop.
28
+ * ,: Comma.
29
+ * &: Ampersand.
30
+ * (): Parentheses.
31
*/
- private const PATTERN_CITY = '/(?:[\p{L}\p{M}\s\-\']{1,100})/u';
32
+ private const PATTERN_CITY = '/^[\p{L}\p{M}\d\s\-\'\.,&\(\)]{1,100}$/u';
33
34
/**
35
* Validate city fields.
0 commit comments