Created
July 10, 2012 07:31
-
-
Save tkjaergaard/3081823 to your computer and use it in GitHub Desktop.
Jquery validate function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function validateStep() | |
| { | |
| var validated = true | |
| $('[id*="step"]:visible .error').removeClass('error'); | |
| $('[id*="step"]:visible .required :input').each(function(){ | |
| if( $(this).val().length <= 0 || !$(this).is(':checked') ) | |
| { | |
| $(this).parent().addClass('error'); | |
| validated = false; | |
| } | |
| }); | |
| return validated; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment