jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: How to validate Form How to validate Form #104459

    Fabrice
    Participant

    Hello,

    I used jqxValidator on a component belong to jqxForm.
    I just want to know if my way of doing this is correct ?

        var nom = mainForm.jqxForm('getComponentByName', 'nom'); // nom === jqxInput
    
        nom.jqxValidator({
            rules: [
                {input: nom, message: 'The username is required!', action: 'blur', rule: 'required'}
            ], theme: 'summer'
        });
    

    it’s strange to set jqxValidator on ‘nom’ and assign input attribute with this same component ‘nom’ ?!


    Fabrice
    Participant

    Hello Hristo,

    Thank’s very much for your reply and the solution.
    Everything is Ok with your example and I found the problem with my code :
    with type: ‘text’ and jqxInput control type , the event raised
    with type: ‘number’ and jqxNumberInput control type, the event is NOT raised

    Fabrice


    Fabrice
    Participant

    Hi,

    The usage of “init” function is Ok with jqxNumberInput, but shows this message when I use the jqxInput type
    <<<Error: jqxInput: Missing Text Input in the Input Group>>>

    init: function(component)
                {
    //                component.jqxNumberInput({ symbol: 'KM', min: 0, width: '250px' });
    
                    component.jqxInput({
                        placeHolder: "Enter a Country",
                        height: 25,
                        width: 200,
                        minLength: 1,
                    });
    
                }

    Why this component raise a error ?
    Thx for your help

    Fabrice

Viewing 3 posts - 1 through 3 (of 3 total)