Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Validator fails if other field has length property

$
0
0
SmartClient version: 10.0p 2015-02-28
IE8, IE11, Chrome

We have a form containing two fields. One is a Text field and the other is a Select field.

The select field fails validation any time multiple values are selected. I've tracked it down to the fact that the text field has the 'length' property set.

Standalone test case:
Code:

isc.DynamicForm.create({
        validateOnChange: true,
        fields: [ {
                name: 'description',
                type: 'text',
                length: 100
        }, {
                name: 'manufacturer',
                multiple: true,
                type: 'intEnum',
                valueMap: {
                        1: 'Sony',
                        2: 'Samsung',
                        3: 'LG'
                }
        } ]
});

Select two items from manufacturer. The validator fails ("Must be whole number").

If you remove the length property from 'description', the validator behaves properly

Viewing all articles
Browse latest Browse all 4756

Trending Articles