cakephp / localized

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

Incorrect french postcode test #156

Closed 2ndGAB closed 7 years ago

2ndGAB commented 7 years ago

I looked at the postcode test validation and I think there is a bad test:

Why

$this->assertTrue(FrValidation::postal('01001'));

and

$this->assertFalse(FrValidation::postal('01000')); // I think it's correct

But I think

$this->assertFalse(FrValidation::postal(' 1000')); // should assert false
antograssiot commented 7 years ago

I'll update it seems you're right. https://www.data.gouv.fr/fr/datasets/base-officielle-des-codes-postaux/

antograssiot commented 7 years ago

pr is open