Skip to content

Commit

Permalink
Greece and Cyprus alpha and mobile added.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesavvakisnet committed Jun 29, 2017
1 parent 18acf49 commit 6a07d95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/alpha.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
var alpha = exports.alpha = {
'en-US': /^[A-Z]+$/i,
'el-GR': /^[Α-Ω]+$/i,
'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
'da-DK': /^[A-ZÆØÅ]+$/i,
'de-DE': /^[A-ZÄÖÜß]+$/i,
Expand All @@ -24,6 +25,7 @@ var alpha = exports.alpha = {

var alphanumeric = exports.alphanumeric = {
'en-US': /^[0-9A-Z]+$/i,
'el-GR': /^[Α-Ω]+$/i,
'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
'da-DK': /^[0-9A-ZÆØÅ]$/i,
'de-DE': /^[0-9A-ZÄÖÜß]+$/i,
Expand Down Expand Up @@ -59,4 +61,4 @@ for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
_locale = 'ar-' + arabicLocales[_i];
alpha[_locale] = alpha.ar;
alphanumeric[_locale] = alphanumeric.ar;
}
}
3 changes: 2 additions & 1 deletion lib/isMobilePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var phones = {
'de-DE': /^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
'da-DK': /^(\+?45)?(\d{8})$/,
'el-GR': /^(\+?30)?(69\d{8})$/,
'el-CY': /^(\+?357?)?(9\d{7})$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-GB': /^(\+?44|0)7\d{9}$/,
'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,
Expand Down Expand Up @@ -78,4 +79,4 @@ function isMobilePhone(str, locale) {
}
return false;
}
module.exports = exports['default'];
module.exports = exports['default'];

0 comments on commit 6a07d95

Please sign in to comment.