cakephp / localized

I18n and L10n related CakePHP code
Other
214 stars 179 forks source link

Fixed bug JpValidation::phone() #164

Closed slywalker closed 7 years ago

slywalker commented 7 years ago

There was a bug in the pull request I sent before. "011-222-3333" case was false.

At the same time I did optimization of regex. Regexper%7C(%3F%3A0%7C%5C%2B81%5B%5Cs%5C-%5D%3F)%5B1-9%5D(%3F%3A(%3F%3A0%5B%5Cs%5C-%5D%3F%5Cd%7B4%7D)%7C(%3F%3A%5B1-9%5D(%3F%3A%5Cd%7B3%7D%7C%5Cd%7B1%7D%5B%5Cs%5C-%5D%5Cd%7B2%7D%7C%5Cd%7B2%7D%5B%5Cs%5C-%5D%5Cd%7B1%7D%7C%5B%5Cs%5C-%5D%5Cd%7B3%7D))%7C(%3F%3A%5B%5Cs%5C-%5D%5Cd%7B4%7D))(%3F%3A%5B%5Cs%5C-%5D%3F%5Cd%7B4%7D))%24%2F)

chinpei215 commented 7 years ago

@slywalker Nice work.