Bug #76434
closedFlexform range validation bug - regression
0%
Description
Hello,
I found a bug in the script : typo3_src/typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js
This bug appears in Typo3 7.6.9, there's no bug with version 7.6.4.
To reproduce this bug, create a content template with this code :
<flux:field.input name="settings.number" label="Number" required="TRUE"/>
Then in the imput form in the BE, if you enter a numeric value (it's ok with an alphabetic value) and try to save the form, you have the message :
The fields marked with an exclamation mark are not yet correctly filled in. Please complete them properly.
This bug apperas because of the validation rule "typeof rule.config.upper", I think it's becasue the value is 'null' instead of 'undefined'.
FormEngineValidation.validateField = function($field, value) { ... case 'range': .... if (typeof rule.config.upper !== 'undefined') { var maxValue = rule.config.upper * 1; if (!isNaN(maxValue) && value > maxValue) { markParent = true; $field.closest(FormEngineValidation.markerSelector).addClass(FormEngineValidation.errorClass); } } ... }
Thanks,
Florian
Updated by Claus Due over 8 years ago
As far as I know this one is "as designed" now. The usage is corrected in Flux and I don't think a core change is needed? If anything: such a change should check if those values are "null" and if they are, not pass them to the JS config.
Updated by Georg Ringer over 8 years ago
- Subject changed from Felxform range validation bug - regression to Flexform range validation bug - regression
Updated by Susanne Moog almost 7 years ago
- Category set to FormEngine aka TCEforms
Updated by Oliver Hader almost 4 years ago
- Status changed from New to Closed
Probably won't be handled as regression fix after four years