Skip to content

Instantly share code, notes, and snippets.

@arbales
Created May 5, 2011 23:36
Show Gist options
  • Save arbales/958199 to your computer and use it in GitHub Desktop.
Save arbales/958199 to your computer and use it in GitHub Desktop.
valid = _.reduce _.invoke(jQ(this).find('input'),'val'), (memo, num) ->
return num.length unless num.length > 5
memo is num
if typeof valid is 'number'
# too short
else if valid isnt yes
# not matching
@arbales
Copy link
Author

arbales commented May 5, 2011

Worst way to validate. ever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment