iso_code in class Country definition and table schema does not match with the actual usage of iso_code property #24254
Labels
1.7.7.3
Affects versions
CO
Category: Core
Feature
Type: New Feature
Languages
Label: Which BO under menu is concerned
Needs Specs
Status: issue needs to be specified
Describe the bug
Not sure how to explain that this as a bug. I'm gonna try my best to explain :) I'm working on an integration for PrestaShop, while i was digging through APIs and schemas i stumble upon something which does not add up.
Here It states that
public $iso_code;
class property size is 2However here in class static property
$definition
the size is defined 3And here in create syntax size is also defined 3
Expected behavior
The size should be consistent. I searched everywhere in PrestaShop for usage of class
country
property$iso_code
and it is used as 2 for size. For Example here country data provider is using 2 letter iso code as expected.In both of these places here and here size should be changed to 2 from 3.
Also here for validation
'validate' => 'isLanguageIsoCode'
is being used. PrestaShop is usingisLanguageIsoCode
to validate both the ISO 2 letter country code and ISO 2 letter language code. However in actual validation class and methodValidate::isLanguageIsoCode
the regex pattern'/^[a-zA-Z]{2,3}$/'
checks for 2 to 3 characters which is also misleading.Additional information
The text was updated successfully, but these errors were encountered: