Jquery validate plugin with ui.dialog

Jquery validate plugin with ui.dialog

Hi,
validator plugin  http://docs.jquery.com/Plugins/Validation is not compatible with ui.dialog?

In asp.net3.5 environment, if I show a dialog with the div containing the fields to validate, validation option are cleared and validator return always true.

A little sample:

  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head runat="server">
  3.     <title></title>
  4.       <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  5.   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
  6.   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  7.   <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
  8.     <script type="text/javascript">
  9.         $(document).ready(function () {$("#divpop").dialog({ modal: true });});
  10.         $("#form1").validate();
  11.     </script>
  12. </head>
  13. <body>
  14.     <form id="form1" runat="server">
  15.         <div>
  16.            <div id="divpop">
  17.                 <label>ciao</label><input type="text" id="txttest" name="txttest" class="required"/><br />
  18.                 <input type="button" value="validate" onclick="alert($('#form1').valid()); return false;" />
  19.             </div>
  20.         </div>
  21.     </form>
  22. </body>
  23. </html>