Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
A bugfix for partial validation which was preventing form submit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogério Taques committed Jan 20, 2016
1 parent 5f799e8 commit 95e0499
Show file tree
Hide file tree
Showing 5 changed files with 786 additions and 784 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jQuery Valida 2.1.5
# jQuery Valida 2.1.6

Valida is a jQuery plugin which provides an easy, fast and lightweight way to make form validations on client-side.
It's source-code (minified) has about *12Kb*.
Expand Down
25 changes: 15 additions & 10 deletions sample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ <h3 >You can find more interesting stuff at <a href="http://awin.com.br?from=val
</div>

<div class="footer" >
<p >&copy;2014, Rogério Taques.</p>
<p >&copy;2016, Rogério Taques.</p>
</div>

<script>
Expand All @@ -296,10 +296,9 @@ <h3 >You can find more interesting stuff at <a href="http://awin.com.br?from=val
</script>

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../src/valida.2.1.4.min.js"></script>
<script type="text/javascript" src="../src/valida.2.1.6.min.js"></script>
<script type="text/javascript" >


$(document).ready(function() {

// show Valida's version.
Expand Down Expand Up @@ -327,19 +326,25 @@ <h3 >You can find more interesting stuff at <a href="http://awin.com.br?from=val
// filters & callbacks
use_filter: true,
// a callback function that will be called right before valida runs.
// it must return a boolan value (true for good results and false for errors)
before_validate: null,
// a callback function that will be called right after valida runs.
// it must return a boolan value (true for good results and false for errors)
after_validate: null
});
*/

// setup the partial validation
$('#partial-1').on('click', function( ev ) {
ev.preventDefault();
$('#res-1').click(); // clear form error msgs
$('form').valida('partial', '#field-1'); // validate only field-1
$('form').valida('partial', '#field-1-3'); // validate only field-1-3
});
// setup the partial validation
$('#partial-1').on('click', function( ev ) {
ev.preventDefault();
$('#res-1').click(); // clear form error msgs
$('form').valida('partial', '#field-1'); // validate only field-1
$('form').valida('partial', '#field-1-3'); // validate only field-1-3
});

});

Expand Down
Loading

0 comments on commit 95e0499

Please sign in to comment.