correct and unify country codes for validation #1191

Merged
merged 2 commits into from Mar 24, 2013

Projects

None yet

2 participants

@dereuromark
CakePHP member

As in postal() ca is the correct (2 letter iso) country code for Canada, so this should be corrected in phone() accordingly.

I will then also update the 2.4 docs:
dereuromark/docs@cakephp:2.4...dereuromark:2.4-validation

@markstory markstory and 1 other commented on an outdated diff Mar 23, 2013
lib/Cake/Utility/Validation.php
case 'all':
- case 'can':
// includes all NANPA members.
@markstory
markstory Mar 23, 2013

The original 3 letter version should be left behind so compatibility is maintained. However all the docs/examples should use the new form.

@dereuromark
dereuromark Mar 23, 2013

Migration guide itself is not enough? Can be mark it as "deprecated" in the code somehow?

@markstory
markstory Mar 24, 2013

Since it is just one line in a case statement, I don't know why we'd break things.

@dereuromark
dereuromark Mar 24, 2013

All right, I'll fix it up.

@markstory markstory merged commit 75fd460 into cakephp:2.4 Mar 24, 2013
@dereuromark dereuromark referenced this pull request in cakephp/docs Mar 24, 2013
Merged

correct country code for validation #530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment