#96654Problem when using maxLength with input type number in TCA or FlexForm
Description
In typo3 by default the eval ‘int, num’ will return an input with type number, I found a problem that does not respect the ‘max’ attribute, since are it works correctly good with the input type text, as I check the problem exists in HTML, and in some case solved by type ‘tel’, I will suggest if are possible to add as ‘eval’ or we check another solution for this problem in TCA and FlexForm.
*Test Case:*
You need to create an input in the Flexform file with eval ‘int’ or ‘num’ and give it a ‘max’ value, you will find how it will give the way to type even length is more than the maxLength.
!number_error_1.png!
error_number_2.png
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 2
History 4
-
taieb rekik changed category 01/26/22, 16:56
-
Andreas Kienast commented and changed status
NewNeeds Feedback 04/04/22, 08:25 -
taieb rekik commented 05/10/22, 14:53
> Thank you so much for the insturuction, i see also that the new type with the typo3 v12 will resolve this type of issue
-
Christian Kuhn commented and changed status
Needs FeedbackClosed 10/23/23, 11:45As far as I understood, this has been resolved in v12 with the introduction of type=number. I hope it’s ok to close here, feel free to pick this up again in case we missed something.
Hello Taleb,
albeit TCA allows this configuration, this has no effect. The thing is, FormEngine renders
<input type="number" ... maxlength="20">which seems to be ignored by browsers.Can you please check whether the following configuration works for you?
<range> <lower>-99999999999</lower> <upper>99999999999</upper> </range>maxwill be very likely ignored completely in v12 as we’re refactoring crucial parts of TCA.