Created
January 3, 2013 16:34
-
-
Save codeimpossible/4444759 to your computer and use it in GitHub Desktop.
I love jquery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function to mark a field invalid in one of our backbone viewws (uses backbone.validation) | |
function markFieldInvalid (view, attr, error) { | |
view.getFieldByName(attr) | |
.addClass('invalid') | |
.parents('.control-group:first') | |
.addClass('error') | |
.find('.help-inline, .help-block') | |
.text(error); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment