ShowHide Changelog
.04b
- Fixed a bug with required fields.
- Added compatibility for data-kcv-required on radio buttons.
- Added data-kcv-instant option to validate fields instantly instead of waiting for the form to be submitted. All fields will still be validated when a form is submitted but fields with data-kcv-instant="true" will be validated when the field loses focus too.
- Currently there is a known bug where multiple validation methods attached to one field will not correctly validate when combined with kcv-instant. This should be resolved in the next release.
- Changed the logic on auto-formatting phone numbers to accomodate for backspacing and removing the dash. Previously the dash was deleted and not added back in without removing an additional number and retyping it.
- Classes have been replaced with data attributes
- Initial release
kcValidate is designed to be the ultimate drop-in validation plugin for both new projects and existing ones. It is built on class-based identification methods and can be implemented into an existing project with hardly any changes to the code.
kcValidate came to existence while looking for a validation plugin to use on another project. Of all the possible solutions I found, none were perfect. Some were overly complicated, some too simple, and some just didn't work at all. So I built kcValidate.
kcValidate doesn't require you to add any additional elements to your page or modify your form in any way. It works by assigning data attributes to your existing input fields. In order to avoid collisions, all classes are prefixed with kcv.
In addition to performing validation on several types of data, kcValidate also perform auto-formatting on fields such as phone number and tax ID. For more information on this, please read over the usage section below.
kcValidate is currently under development and new validation methods are being added regularly. If you have a suggestion I would love to hear it. Drop me a line at root@kevinacrider.com and please check back regularly for updates!