Skip to content

Commit

Permalink
Replaces all the underscores in sentenceCase formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
thedersen committed Aug 18, 2013
1 parent aad4d75 commit 257c832
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/backbone-validation-amd-min.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/backbone-validation-amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
sentenceCase: function(attrName) {
return attrName.replace(/(?:^\w|[A-Z]|\b\w)/g, function(match, index) {
return index === 0 ? match.toUpperCase() : ' ' + match.toLowerCase();
}).replace('_', ' ');
}).replace(/_/g, ' ');
},

// Looks for a label configured on the model and returns it
Expand Down
Loading

0 comments on commit 257c832

Please sign in to comment.