Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support german stuff #477

Merged
merged 4 commits into from
Feb 4, 2016
Merged

Support german stuff #477

merged 4 commits into from
Feb 4, 2016

Conversation

m19c
Copy link
Contributor

@m19c m19c commented Jan 22, 2016

No description provided.

@m19c
Copy link
Contributor Author

m19c commented Jan 26, 2016

Status?

@chriso
Copy link
Collaborator

chriso commented Jan 26, 2016

This is too much of a breaking change I'd say. I'd accept a PR where you could specify the locale, e.g. validator.isAlpha(str, {locale: 'de-DE'})

@@ -99,7 +99,8 @@
'nn-NO': /^(\+?47)?[49]\d{7}$/,
'vi-VN': /^(0|\+?84)?((1(2([0-9])|6([2-9])|88|99))|(9((?!5)[0-9])))([0-9]{7})$/,
'en-NZ': /^(\+?64|0)2\d{7,9}$/,
'en-IN': /^(\+?91|0)?[789]\d{9}$/
'en-IN': /^(\+?91|0)?[789]\d{9}$/,
'de-DE': /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is too verbose. The other mobile phone validators expect that you've stripped non-numeric characters.

@chriso
Copy link
Collaborator

chriso commented Feb 3, 2016

Looking good. Can you update the README?

@addaleax
Copy link
Contributor

addaleax commented Feb 3, 2016

@MrBoolean Why äöü but not ß? (There is also U+1E9E , which JS regexes do not recognize as the upper-case variant of ß, but whether to include an upper-case in the German alphabet or not is always good for starting debates… 😄)

@m19c
Copy link
Contributor Author

m19c commented Feb 3, 2016

@addaleax, you are right. Added.
@chriso: README.md updated.

@chriso chriso merged commit fe697ac into validatorjs:master Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants