{"data":{"id":"magento2-40416","source":"github-pr","sourceRef":"magento/magento2#40416","title":"Customer address telephone validation does not work when there are no allowed characters","pr":{"number":40416,"url":"https://github.com/magento/magento2/pull/40416","author":"yaroslav-kozar","mergedAt":"2026-02-10T16:48:18Z","mergeCommit":"dbecd7af8a42652d012a997ce98e4cd76ea48994","headCommit":"5e1c38cdaab6d4b88829fc5634d4579e8480a912","baseRef":"2.4-develop","diffSha256":"aee7abbe27865e9fb3db14920ce30bb6d2bc63e8f633c2c89d36cd1139165056"},"issues":[{"number":40361,"url":"https://github.com/magento/magento2/issues/40361","title":"Customer address telephone validation does not work when there are no allowed characters","labels":["Area: Account","Component: Customer","Issue: Confirmed","Priority: P2","Progress: PR Created","Progress: done","Reported on 2.4.8-p3","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.9","containingTags":["2.4.9"],"reportedOn":"2.4.8-p3","codeMatch":{"2.4.6":"file-missing","2.4.6-p1":"file-missing","2.4.6-p2":"file-missing","2.4.6-p3":"file-missing","2.4.6-p4":"file-missing","2.4.6-p5":"file-missing","2.4.6-p6":"file-missing","2.4.6-p7":"file-missing","2.4.6-p8":"file-missing","2.4.6-p9":"file-missing","2.4.6-p10":"file-missing","2.4.6-p11":"file-missing","2.4.6-p12":"file-missing","2.4.6-p13":"file-missing","2.4.6-p14":"file-missing","2.4.6-p15":"file-missing","2.4.7":"file-missing","2.4.7-p1":"file-missing","2.4.7-p2":"file-missing","2.4.7-p3":"file-missing","2.4.7-p4":"file-missing","2.4.7-p5":"file-missing","2.4.7-p6":"file-missing","2.4.7-p7":"file-missing","2.4.7-p8":"file-missing","2.4.7-p9":"file-missing","2.4.7-p10":"file-missing","2.4.8":"clean","2.4.8-p1":"clean","2.4.8-p2":"clean","2.4.8-p3":"clean","2.4.8-p4":"clean","2.4.8-p5":"clean","2.4.9":"conflict"},"affectedVersions":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5"],"components":["magento/module-customer"],"files":[{"path":"app/code/Magento/Customer/Model/Validator/Telephone.php","change":"modified","package":"magento/module-customer"}],"stripped":{"tests":["app/code/Magento/Customer/Test/Unit/Model/Validator/TelephoneTest.php"],"docs":[],"outsideCode":[]},"linesChanged":19,"mergeBatched":false,"excluded":null,"sections":{"description":"Address is saved with `aaaa` as Telephone","stepsToReproduce":"Hello,\n\nThe customer address validation done in class `vendor/magento/module-customer/Model/Validator/Telephone.php` does not work as intended if you type no allowed characters.\n\nSteps to reproduce:\n- Create a customer account\n- Go to address book and create an adress\n- Enter `aaaa` as Telephone","expectedResult":"I should have an error message saying the telephone is invalid","actualResult":"Address is saved with `aaaa` as Telephone","source":"issue"},"signatures":[],"labels":{"area":["Account"],"component":["Customer"],"priority":"P2","severity":null,"reportedOn":["2.4.8-p3"]},"categories":["Customer"],"triage":{"model":"@cf/cloudflare/clef","requestHash":"6576520b4880a594eedd4b7448d5745570cccd614213f6e2af1a3c7f4c10ff35","isBugfix":0.9797,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9392,"feature":0.0066,"refactor":0.029,"tests_only":0.0142,"docs_only":0.0059,"dependency":0.0051},"confidence":0.86},"scope":{"score":1.0439,"probabilities":{"0":0.1417,"1":0.6726,"2":0.1857},"confidence":0.2604},"risk":{"score":0.2584,"probabilities":{"0":0.8,"1":0.1416,"2":0.0584},"confidence":0.4951},"area":{"choice":"customer","probabilities":{"catalog":0.0029,"checkout":0.0049,"customer":0.9714,"admin":0.0083,"graphql_api":0.0025,"framework":0.0039,"frontend":0.0036,"other":0.0025},"confidence":0.9358},"securityRelevant":0.0538,"reportedVersion":{"choice":"2.4.8-p3","probabilities":{"2.4.0":0.0022,"2.4.0-p1":0.0025,"2.4.1":0.0023,"2.4.1-p1":0.0025,"2.4.2":0.0023,"2.4.2-p1":0.0026,"2.4.2-p2":0.0029,"2.4.3":0.0025,"2.4.3-p1":0.003,"2.4.3-p2":0.0035,"2.4.3-p3":0.0035,"2.4.4":0.0026,"2.4.4-p1":0.0029,"2.4.4-p10":0.0035,"2.4.4-p11":0.0043,"2.4.4-p12":0.0039,"2.4.4-p13":0.0043,"2.4.4-p14":0.0037,"2.4.4-p15":0.0034,"2.4.4-p16":0.0034,"2.4.4-p17":0.0033,"2.4.4-p18":0.0029,"2.4.4-p2":0.0024,"2.4.4-p3":0.0024,"2.4.4-p4":0.0025,"2.4.4-p5":0.0027,"2.4.4-p6":0.0029,"2.4.4-p7":0.0029,"2.4.4-p8":0.0034,"2.4.4-p9":0.0028,"2.4.5":0.0027,"2.4.5-p1":0.0027,"2.4.5-p10":0.003,"2.4.5-p11":0.0034,"2.4.5-p12":0.0048,"2.4.5-p13":0.004,"2.4.5-p14":0.0039,"2.4.5-p15":0.0031,"2.4.5-p16":0.0031,"2.4.5-p17":0.0032,"2.4.5-p2":0.003,"2.4.5-p3":0.0032,"2.4.5-p4":0.003,"2.4.5-p5":0.0029,"2.4.5-p6":0.0035,"2.4.5-p7":0.0032,"2.4.5-p8":0.0031,"2.4.5-p9":0.0027,"2.4.6":0.0035,"2.4.6-p1":0.004,"2.4.6-p10":0.0049,"2.4.6-p11":0.0054,"2.4.6-p12":0.0051,"2.4.6-p13":0.0052,"2.4.6-p14":0.0054,"2.4.6-p15":0.0043,"2.4.6-p2":0.0035,"2.4.6-p3":0.0037,"2.4.6-p4":0.0044,"2.4.6-p5":0.0042,"2.4.6-p6":0.0052,"2.4.6-p7":0.0045,"2.4.6-p8":0.0037,"2.4.6-p9":0.0029,"2.4.7":0.0047,"2.4.7-p1":0.0049,"2.4.7-p10":0.0045,"2.4.7-p2":0.004,"2.4.7-p3":0.007,"2.4.7-p4":0.0066,"2.4.7-p5":0.0051,"2.4.7-p6":0.0056,"2.4.7-p7":0.0048,"2.4.7-p8":0.0044,"2.4.7-p9":0.003,"2.4.8":0.0167,"2.4.8-p1":0.0035,"2.4.8-p2":0.0195,"2.4.8-p3":0.6318,"2.4.8-p4":0.0266,"2.4.8-p5":0.0165,"2.4.9":0.0077,"unspecified":0.0047},"confidence":0.3948},"backportWorthy":{"score":1.6296,"probabilities":{"0":0.0872,"1":0.1961,"2":0.7167},"confidence":0.3396}},"curated":{"title":"Fixes customer address telephone validation accepting values like aaaa","description":"Customer address telephone validation in Telephone.php did not work when the telephone had no allowed characters, so an address was saved with aaaa as Telephone. The old pattern had no anchors, and with no match the validator would return true. The fix adds anchors to PATTERN_TELEPHONE and uses the preg_match result, so such input is rejected with the Invalid Phone Number error message.","categories":["Customer"],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":{"2.4.8-p5":{"before":"not-runnable","after":"error","adapted":false,"runAt":"2026-10-06T09:20:15.583Z","releaseCommit":"870a22c63d9d9b68fa3297962e2d5d5841115814","suites":{"unit":{"before":"not-runnable","after":"error","runAt":"2026-10-06T09:20:15.583Z"}}}}},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40416 details"}