jQuery UI Widgets Forums Plugins Validator, Drag & Drop, Sortable Prevent Validation from Triggering Automatically

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 8 months ago.

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

  • mboyle
    Member

    Hello,
    Is there a way to specify the validation rules in such a way that they will ONLY trigger the validation rules when the $(‘#MyJqxValidator’).validate() function is explicitly called (i.e. prevent the validation rules from triggering via DOM events)? I tried setting the action property of the rule to null/blank, but it appears the action trigger will default to blur if no action is specified.

    Thank you.


    Peter Stoev
    Keymaster

    Hi mboyle,

    A possible solution would be to use custom validation rules defined as callback functions as the one for the Date validation in our demo. Then you may validate the fields depending on some custom Boolean flag defined outside the functions and used inside the validation functions. If the flag’s value is true, then implement your validation logic, if it is false, then always return true. Set the boolean flag before calling the “validate” function.

    Best Regards,
    Peter Stoev

    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.