Skip to content

Instantly share code, notes, and snippets.

@mildfuzz
Created October 11, 2012 09:40
Show Gist options
  • Select an option

  • Save mildfuzz/3871289 to your computer and use it in GitHub Desktop.

Select an option

Save mildfuzz/3871289 to your computer and use it in GitHub Desktop.
Detect if a string input is a valid CVV Credit Card Security number
String.prototype.isCVV = function(){
return (this.length >= 3 && this.length <=4) && Number(this) ? true : false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment