Skip to content

Adding Brazilian Formatting#45

Open
cristovao-trevisan wants to merge 5 commits intosample-usr:masterfrom
cristovao-trevisan:master
Open

Adding Brazilian Formatting#45
cristovao-trevisan wants to merge 5 commits intosample-usr:masterfrom
cristovao-trevisan:master

Conversation

@cristovao-trevisan
Copy link

I'm adding the brazilian phone format. The problem is that the format may change among the states (and cities), including an extra number.
It may look like this: +55 (..) ....-....
Or like this: like this: +55 (..) .....-....

I decided to add another string match for optional numbers, to be set only when all the dots are already fulfilled, and named it "?".

Also I think the length of the input should not be longer than the format specifies (don't know if this is a general case though), so I removed the possibility for the formatted number to outgrow the specification.

I also changed the default validity function to check the format after it the input has been clicked.

@cristovao-trevisan cristovao-trevisan changed the title Adding Brazil Formatting Adding Brazilian Formatting May 22, 2017
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.

1 participant