From v0.6.0, the plugin name is changed to FormValidation. To upgrade from v0.5.3 to v0.6.0, perform the following steps:
Required Step: Changing CSS, Javascript paths
This step is required.
v0.5.3: v0.6.0:Don't confuse bootstrap(.min).js file provided by the Bootstrap framework with bootstrap(.min).js provided by FormValidation which is placed inside the formvalidation/dist/js/framework directory.
They are two different files and both of them need to be included as mentioned above.
Required Step: Changing your own validator
You can ignore this step in case you don't have any your own validators. Otherwise, change its declaration as following:
v0.5.3: v0.6.0:Optional Step: Calling plugin
After completing the steps above, you can call the plugin by both programmatic and declarative usages as before.
Using v0.5.3 options as your current one are supported in all v0.6.x releases. It means that you will have a lot of time to upgrade your code while current one still work.
Anyway, it is recommended to change the plugin calling, options which are listed as following:
Attribute
v0.5.3 | v0.6.0 |
---|---|
Using data-bv-xxx attribute |
Using data-fv-xxx attribute |
Form settings
v0.5.3 | v0.6.0 |
---|---|
container | err.container |
feedbackIcons | icon |
group | row.selector |
submitButtons | button.selector |
Example | |
Field settings
Events
There are two changes about the event names:
- The namespace
.bv
is changed to.fv
- The namespace
error.
is changed toerr.
to avoidwindow.onerror
being invoked by jQuery
v0.5.3 | v0.6.0 |
---|---|
Form events | |
init.form.bv |
init.form.fv |
error.form.bv |
err.form.fv |
success.form.bv |
success.form.fv |
added.field.bv |
added.field.fv |
removed.field.bv |
removed.field.fv |
Field events | |
init.field.bv |
init.field.fv |
error.field.bv |
err.field.fv |
success.field.bv |
success.field.fv |
status.field.bv |
status.field.fv |
Validator events | |
error.validator.bv |
err.validator.fv |
success.validator.bv |
success.validator.fv |
The last thing, the hexColor validator, deprecated in v0.5.3, is replaced with color validator.