Skip to content

Instantly share code, notes, and snippets.

@gladiatorAsh
Created June 18, 2015 11:01
Show Gist options
  • Save gladiatorAsh/c7830d7b9c973906e5bb to your computer and use it in GitHub Desktop.
Save gladiatorAsh/c7830d7b9c973906e5bb to your computer and use it in GitHub Desktop.
function CheckGreaterThanZero($element) {
if ($element.is('input:text')) {
if ($element.val().trim() == "") {
return;
}
if ($.inArray($element[0], objValidationFailed) === -1) {
if (!$.validate($element.val(), "greaterThanZero")) {
validated = false;
objValidationFailed.push($element[0]);
$element.addClass('error');
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment