Skip to content

Instantly share code, notes, and snippets.

@jlxw
Created October 7, 2016 02:51
Show Gist options
  • Save jlxw/a4e7aa70e25a1d68e9f11288c2272840 to your computer and use it in GitHub Desktop.
Save jlxw/a4e7aa70e25a1d68e9f11288c2272840 to your computer and use it in GitHub Desktop.
Parsley 2.5 and Bootstrap 4
<script src='https://cdnjs.cloudflare.com/ajax/libs/parsley.js/2.5.0/parsley.min.js'></script>
<script>
Parsley.options.errorClass = 'has-danger'
Parsley.options.successClass = 'has-success'
Parsley.options.classHandler = function(f) { return f.$element.closest('.form-group'); }
Parsley.options.errorsWrapper = '<div class="form-control-feedback"></div>'
Parsley.options.errorTemplate = '<div></div>'
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment