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

Add Brazilian postcode (brCep) #7

Closed
wants to merge 1 commit into from

Conversation

marcio
Copy link

@marcio marcio commented Jan 28, 2015

Hi,

It's a simple validate for Brazilian postcode.

@arasatasaygin
Copy link
Owner

Hey @marcio It looks pretty good. I'm keeping this PR because I still did not decide if we should add these methods to library or provide a method to the library user to set new RegExps on the fly.
What do you think about it?

@davidhund
Copy link

@arasatasaygin while you think about that you could add a NL postalcode regex :-)
/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/

@marcio
Copy link
Author

marcio commented Jan 29, 2015

Hi @arasatasaygin!
Provide a method for the user to set new RegExps sounds very nice. I think this is more elegant way to is.js be customizable and powerful. Maybe something like lodash mixins approach https://lodash.com/docs#mixin. (https://github.com/lodash/lodash/blob/master/lodash.js#L10054).

It's your turn, what do you think about it? 😃

@arasatasaygin
Copy link
Owner

Hey @marcio like you said, providing a method for the user is more elegant and will prevent long run bloats. You can check #15 if you are interested.
Thank you very much.

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.

None yet

3 participants