Skip to content

Commit 2ed9af3

Browse files
committed
16544: Static fixes
1 parent e189fc9 commit 2ed9af3

File tree

1 file changed

+4
-2
lines changed
  • app/code/Magento/Ui/view/base/web/js/lib/validation

1 file changed

+4
-2
lines changed

app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,15 @@ define([
231231
function (value) {
232232
value = value.replace(/\s+/g, '');
233233

234-
return utils.isEmpty(value) || value.length > 9 && value.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
234+
return utils.isEmpty(value) || value.length > 9 &&
235+
value.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
235236
},
236237
$.mage.__('Please specify a valid phone number')
237238
],
238239
'phoneUK': [
239240
function (value) {
240-
return utils.isEmpty(value) || value.length > 9 && value.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
241+
return utils.isEmpty(value) || value.length > 9 &&
242+
value.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/);
241243
},
242244
$.mage.__('Please specify a valid phone number')
243245
],

0 commit comments

Comments
 (0)