jQWidgets Forums

jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable validator for jqxComboBox

This topic contains 1 reply, has 1 voice, and was last updated by  neong 12 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • validator for jqxComboBox #15993

    neong
    Participant

    I try to do the validator for jqxComboBox. I was success for valid while user have select the jqxComboBox. However, the user does not perform select jqxComboBox and that jqxComboBox was required field. It’ was failed to do it.

    $(‘#form’).jqxValidator({

    rules: [

    { input: ‘#nationality’, message: ‘Nationality is required!’, action: ‘valuechanged,select’, rule: function () {
    var item = $(“#nationality”).jqxComboBox(‘getSelectedItem’);
    if(item.value > 0 ){
    return true
    }
    return false;
    }
    }

    ]

    })

     

    $(“#saveButton”).bind(‘click’, function () {
    var validationResult = function (isValid) {
    if (isValid) {
    $(“#form”).submit();
    }
    }
    $(‘#form’).jqxValidator(‘validate’, validationResult);
    });

     

    Can you please help me to check on my code and give me an advised? Thanks

    validator for jqxComboBox #15996

    neong
    Participant

    Soory, I was found the solution. Just ignore my question. For those have the same problem, you can get the answer at here
    http://www.jqwidgets.com/community/topic/jqx-combobox-validator/

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

You must be logged in to reply to this topic.