Using Dialog with JQuery Validator

Using Dialog with JQuery Validator

Hi,

I am using JQuery Validator like this:

  1. rules:
  2. {
  3. cboPaid:
  4. {
  5. required: true
  6. },
  7. cboCategory:
  8. {
  9. required: true
  10. },
  11. dateFrom:
  12. {
  13. required: true
  14. },
  15. dateTo:
  16. {
  17. required: true
  18. }
  19. },

I want to use use JQuery dialog with it like this:

  1. rules:
  2. {
  3.    cboPaid:
  4.    {
  5.             $('#msgAlert').html("Please select paid or unpaid!");

  6.             $('#dialogAlert').popup();
  7.             $("#dialogAlert").popup("open"); 
  8.    },
  9.    cboCategory:
  10.    {
  11.             $('#msgAlert').html("Please select the category!");

  12.             $('#dialogAlert').popup();
  13.             $("#dialogAlert").popup("open"); 
  14.    },
  15.    dateFrom:
  16.    {
  17.             $('#msgAlert').html("Please select {From} date!");

  18.             $('#dialogAlert').popup();
  19.             $("#dialogAlert").popup("open"); 
  20.    },
  21.    dateTo:
  22.    {
  23.             $('#msgAlert').html("Please select {To} date!");

  24.             $('#dialogAlert').popup();
  25.             $("#dialogAlert").popup("open"); 
  26.    }
  27. },

How can I do this please?


Thanks,