Skip to content

Instantly share code, notes, and snippets.

@arisGio
Forked from osvik/gist:3961003
Created February 9, 2025 17:46
Show Gist options
  • Save arisGio/7a1c2c8b15f8f994e966a938ac670b2a to your computer and use it in GitHub Desktop.
Save arisGio/7a1c2c8b15f8f994e966a938ac670b2a to your computer and use it in GitHub Desktop.
Greek phone validation
var isGreek = {
mobile: function(value) {
return /^(\+30|0030)?69\d{8}$/.test( value.replace(/[\s\-()\.]/g, "") );
},
landline: function(value) {
return /^(\+30|0030)?(210)?\d{7}$/.test( value.replace(/[\s\-()\.]/g, "") );
},
phone: function(value) {
return isGreek.mobile(value) || isGreek.landline(value);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment