Issue Bug Closed

#70916Flexform input range slider validation problem

Alexander Götz 10/21/15, 16:31 updated 06/22/16, 09:22

Description

Hello,

i’m on the latest TYPO3 7 dev-master.

My Flexform:

...
<settings.itemsPerPage>
    <TCEforms>
        <label>Test</label>
        <config>
            <type>input</type>
            <size>2</size>
            <default>10</default>
            <eval>int</eval>
            <range>
                <lower>1</lower>
                <upper>20</upper>
            </range>
            <wizards>
                <slider>
                    <type>slider</type>
                    <step>1</step>
                </slider>
            </wizards>
        </config>
    </TCEforms>
</settings.itemsPerPage>
...

If I choose a value through the slider or Input field the validation results (red marked input field) are:
1-2: no error
3-9: error
10-20: no error

I could solve the problem for my case if I changed the file:
typo3/sysext/backend/Resources/Public/JavaScript/FormEngineValidation.js (Line 290)

var minValue = rule.config.lower || 0;
var maxValue = rule.config.upper || Number.MAX_VALUE;

I casted the rule.config.lower and rule.config.upper to Int and the validation works alright.

I guess this would cause errors on other backend inputs but maybe there is a better solution for that.

Thanks.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.