README.md in bootstrap-validator-rails-0.5.0.1 vs README.md in bootstrap-validator-rails-0.5.0.2
- old
+ new
@@ -19,6 +19,31 @@
`*= require bootstrapValidator.min`
**In your Rails directory run**
-`bundle install`
\ No newline at end of file
+`bundle install`
+
+### Together with Rails remote form
+
+To use bootstrapValidator in a Rails remote form, you have to initialize the form validator like this:
+
+```javascript
+$(form)
+ .bootstrapValidator({
+ ...
+ })
+ .on('success.form.bv', function(e) {
+ // Called when the form is valid
+
+ var $form = $(e.target);
+ if ($form.data('remote') && $.rails !== undefined) {
+ e.preventDefault();
+ }
+ });
+```
+
+Reference:
+* [success.form.bv](http://bootstrapvalidator.com/settings/#event-form) event
+
+If you don't, your form will be submitted two times.
+