Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laminas\I18n\Validators are not working out of the box #51

Open
haniWeiss opened this issue Jan 29, 2020 · 1 comment
Open

Laminas\I18n\Validators are not working out of the box #51

haniWeiss opened this issue Jan 29, 2020 · 1 comment
Labels
Enhancement New feature or request

Comments

@haniWeiss
Copy link

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

@Xerkus Xerkus added the Enhancement New feature or request label Jan 29, 2020
@samsonasik
Copy link
Member

possibly duplicate with #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants