Details
-
Bug
-
Resolution: Fixed
-
High
-
2.3.2
-
None
Description
As a user I would expect to be able to enter min and max values for the fields exposed in the form editing view of the "number" field type.
However when I do enter the values and store the values, I am presented the following error page:
Type error: Argument 1 passed to EzSystems\EzPlatformFormBuilder\Form\Validator\Constraints\MaxValue::__construct() must be of the type float or null, string given, called in /Users/janit/Sites/foobar/vendor/ezsystems/ezplatform-form-builder/src/lib/Form/Mapper/FieldValidator/GenericFieldValidatorConstraintMapper.php on line 50
The reason seems to be that the system expects either a null of float value for MinValue and MaxValue items, but in the constructor the passed value is passed as a string ( '1337' vs 1337 ):
MaxValue->__construct('1337')
in vendor/ezsystems/ezplatform-form-builder/src/lib/Form/Mapper/FieldValidator/GenericFieldValidatorConstraintMapper.php (line 50)
How to reproduce:
1. Install eZ Platform EE
2. Create Form
3. Add number field to form
4. Close form and save object
5. Everything works as expected
6. Reopen editing and proceed to edit form
7. Add minimum and maximum values for field
8. Exit form editing
9. Observe exception mentioned above
Attachments
Issue Links
- relates to
-
EZEE-2535 Error when setting min / max value constraints on form builder number field
- Closed