jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable Different validation on same input field

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Different validation on same input field #42986

    mallepaddi
    Participant

    Hi

    I do have “Seach Box” called “Product” which is being used for product search.

    Search results being displaying into a grid called “searchgrid” and it’s been working fine with “validator”, asking user to enter value “if search is bpx is empty but hit search button”.

    On my right i do have another grid called “Shopping Cart grid”, now the requirement was, when the user enters value into seach field and hits “ENTER” button then product has to be added to cart and doing the same for same code should show an validation error “Product has already been added”,

    Above functionality should not disturb “search” products when user clicks on “Search” button.

    In simple ..

    Click “Search” – show results in “search grid”
    Client “Enter” in “Search Box” – add product to “Shopping Cart Grid”

    Empty Search box – clicks Search – Error ” Please enter Search value.
    Enter value – clicks “Enter” – Error “Product already exists” (if it’s been added before).

    how to achieve this ?

    Please help.

    Thanks

    Different validation on same input field #43570

    Dimitar
    Participant

    Hello mallepaddi,

    You can have different rules that apply to a single input, as shown in the demo Default Functionality. However, there is no way to capture which key has been pressed and check if it is Enter or not.

    Best Regards,
    Dimitar

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

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

You must be logged in to reply to this topic.