Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Blur validation
events:
"blur form input": "validateInput"
validateInput: (ev) ->
$input = $(ev.target)
input_name = $(ev.target).attr 'name'
input_value = $(ev.target).val()
if input_value.length
@model.set input_name, input_value
@model.isValid input_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment