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

i18n validators used outside suggested laminas-form view helpers #152

Open
gisostallenberg opened this issue Sep 7, 2021 · 0 comments
Open
Labels
Bug Something isn't working

Comments

@gisostallenberg
Copy link

gisostallenberg commented Sep 7, 2021

Bug Report

Q A
Version(s) 3.0.1

Summary

The package suggests to require laminas/laminas-i18n with the following notice ^2.11, required when using laminas-form view helpers, but when using a Range Element the getValidators method instantiates a new Laminas\I18n\Validator\IsFloat.

Current behavior

How to reproduce

Make sure the suggested package is not installed:

composer remove laminas/laminas-i18n

Run this code:

        $form = (new \Laminas\Form\Form())->add(
            (new \Laminas\Form\Element\Range('range'))
                ->setAttributes(['min' => 1, 'max' => 10])
        );
        $form->getInputFilter(); // Class \"Laminas\\I18n\\Validator\\IsFloat\" not found
@gisostallenberg gisostallenberg added the Bug Something isn't working label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant