jQuery UI Widgets Forums Lists ComboBox Validation events

This topic contains 2 replies, has 2 voices, and was last updated by  jusmas 10 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Validation events #57440

    jusmas
    Participant

    Hi.. I have a combobox “places”. I wanted to validate the following events:

    Blur: Fire “Place required” if no item is selected from the list.
    Key Up : Fire “Place required” when user would have typed few characters and stopped when no matching items,and moved to next field.
    Click inside combo and click on any other control: Fire “Place required”
    Click button with empty combobox and validating form : Fire “Places required”
    When a validation error message is already displaying and the user make a selection from the list: Disappear the error message.

    Please provide me a sample.

    Validation events #57459

    Dimitar
    Participant

    Hello jusmas,

    An example can be found in the following forum post: http://www.jqwidgets.com/community/topic/combobox-validation/#post-30470. We hope it is helpful to you.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Validation events #57532

    jusmas
    Participant

    I think the following validation will do this.

    {input:’#places input’, message:’City is required!’, action:’keyup,blur,select’, rule:
    function (input) {
    if($(‘#places’).jqxComboBox(‘selectedIndex’)> -1 ) return true; else return false;
    }
    },

    • This reply was modified 10 years ago by  jusmas.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.