├── README.md ├── bower.json └── parsleyConfig.js /README.md: -------------------------------------------------------------------------------- 1 | #Twitter bootstrap 3 - Parsley JS configuration 2 | 3 | The aim of this repo is to simply have a repo with that configuration that you use everyday and you want just to add it to your project every day. 4 | 5 | With it ParsleyJs and Twitter Bootstrap will work fine together. 6 | 7 | 8 | ##Installation note 9 | 10 | Add the package before the parsleyJs one. 11 | 12 | 13 | ##Install with bower 14 | 15 | ``` 16 | bower install parsleyjs-bootstrap3 -S 17 | ``` 18 | 19 | 20 | ##References 21 | 22 | The original snippet: 23 | https://gist.github.com/askehansen/11253752 24 | 25 | http://parsleyjs.org/doc/index.html#psly-usage-global-configuration 26 | 27 | http://parsleyjs.org/doc/annotated-source/defaults.html 28 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parsleyjs-bootstrap3", 3 | "main": "parsleyConfig.js" 4 | } -------------------------------------------------------------------------------- /parsleyConfig.js: -------------------------------------------------------------------------------- 1 | window.ParsleyConfig = { 2 | errorClass: 'has-error', 3 | successClass: 'has-success', 4 | classHandler: function(ParsleyField) { 5 | return ParsleyField.$element.parents('.form-group'); 6 | }, 7 | errorsContainer: function(ParsleyField) { 8 | return ParsleyField.$element.parents('.form-group'); 9 | }, 10 | errorsWrapper: '', 11 | errorTemplate: '
' 12 | }; --------------------------------------------------------------------------------