Releases: caneara/iodine
Actions
Added Github Actions for CI styling and tests.
v3.0.4
version bump
v3.0.3
fixed formatting
v3.0.1
Third release
This release adds support for custom validation rules. See the readme for details.
In order to better handle situations where you might be validating a variable or object instead of a form field, the default error messages have had the word 'Field' replaced with 'Value'.
A bug was fixed where using the 'same' or 'different' rules would fail for multiple checks due to their use of strict comparison checking. These functions now use loose comparison instead. If you still want strict comparison for single checks, you are free to add a custom rule e.g.
Iodine.addRule('sameStrict', (value, param) => value === param);
Iodine.addRule('differentStrict', (value, param) => value !== param);
v2.0.3
bump version number
v2.0.2
improved getErrorMessage method, fleshed out the readme
NPM support
This minor release adds NPM support to the package.
Review the readme for more details.
Second release
This release adds support for error messages. See the readme for more details.
IMPORTANT: The introduction of error message support resulted in a breaking change. When performing a multiple rule check, Iodine previously returned the rule name without the parameter when validation failed e.g. 'minimum'
. Iodine now returns the full rule and parameter string e.g. 'minimum:7'
, thus allowing you to easily pass the result into the getErrorMessage
method.
You should adjust your code to handle this change when updating to version 2.
A bug was also fixed so that comma-separated strings can be supplied to isIn
and isNotIn
e.g.
Iodine.isIn('a', 'a,b,c');
Iodine.is('a', 'in:a,b,c');
First release
Please review the readme for details.