Closed troyji closed 13 years ago
All of the test cases pass on the included change sets.
Additionally, I ran a few more tests with these changes on a test site. They are working beautifully.
The following tests require 'jquery.js' and 'regula.js'.
troy.html
<html>
<body>
<input type="text" data-constraints="@IsNumeric"></input>
<div id="content">
<input type="text" data-constraints="@Required"></input>
</div>
<button id="validate">Validate</button>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="regula.js"></script>
<script type="text/javascript" src="troy.js"></script>
</body>
</html>
troy.js
$(window).load(
function()
{
$("#validate").click(function()
{
regula.bind();
$("#content").remove("*");
var results = regula.validate();
$.each(results, function(i, r)
{
alert(r.message);
});
});
});
Note that the input elements do not use the 'regula-validation' class. Note that the input box inside of the 'content' div is being destroyed between calls to 'bind()' and 'validate()'.
Fix for issue #10: https://github.com/vivin/regula/issues/10 Fix for issue #8: https://github.com/vivin/regula/issues/8