Laminas\I18n\Validators are not working out of the box
haniWeiss opened this issue · 1 comments
Feature Request
Q | A |
---|---|
New Feature | yes |
RFC | yes |
BC Break | yes/no |
Summary
Using the command
composer create-project laminas-api-tools/api-tools-skeleton path/to/install
I created a new Api tools project on my local vagrant box (Debian 10, PHP7.3.11, Apache2)
While I was adding validator to the fields I created, I got error failing to add validators
The validators I was trying to add are:
Laminas\I18n\Validator\Alpha
Laminas\I18n\Validator\IsFloat,
It was not clear why it is failing, but after a while I found that the component "laminas-i18n" is missing.
I fixed the issue by running the command
composer require laminas/laminas-i18n
I've been told that the component laminas/laminas-i18n is considered an optional and those validators will not provide by default.
Therefore I suggest to make this clear in the admin panel that those validators will be available only when the optional component "laminas/laminas-i18n" is installed
The affected validators are:
Laminas\I18n\Validator\Alpha
Laminas\I18n\Validator\IsFloat,
Laminas\I18n\Validator\Alnum
Laminas\I18n\Validator\DateTime
Laminas\I18n\Validator\Int
Laminas\I18n\Validator\Float
Laminas\I18n\Validator\IsInt
Laminas\I18n\Validator\PhoneNumber
Laminas\I18n\Validator\PostCode
possibly duplicate with #16