Skip to content

Instantly share code, notes, and snippets.

@MarkBorcherding
Created April 8, 2010 20:25
Show Gist options
  • Select an option

  • Save MarkBorcherding/360498 to your computer and use it in GitHub Desktop.

Select an option

Save MarkBorcherding/360498 to your computer and use it in GitHub Desktop.
function shouldValidate(input){
var $input = $(input);
return $input.data("startingValue") != "" || $input.is(".error");
}
function shouldValidate(input){
var $input = $(input);
var weStartedWithAValue = $input.data("startingValue") != "";
var weWereAlreadyMarkedWithAnError = $input.is(".error");
return weStartedWithAValue || weWereAlreadyMarkedWithAnError;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment