Skip to content

Commit

Permalink
Merge branch 'jjcosare-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kelp404 committed Jul 26, 2014
2 parents b488f48 + 2437287 commit 3b1db94
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ node_modules
bower_components

# compass
.sass-cache
.sass-cache
.project
6 changes: 5 additions & 1 deletion dist/angular-validator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/angular-validator.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/provider.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ angular.module 'validator.provider', []
for label in parent.find('label') when $(label).hasClass 'error'
$(label).remove()
$label = $ "<label class='control-label error'>#{errorMessage}</label>"
$label.attr 'for', attrs.id if attrs.id
$(element).parent().append $label
$label.attr('for', attrs.id) if attrs.id
if $(element).parent().hasClass 'input-group'
$(element).parent().parent().append $label
else
$(element).parent().append $label
break
parent = parent.parent()

Expand Down

0 comments on commit 3b1db94

Please sign in to comment.