Releases: dncgmh/simp-validator
Releases · dncgmh/simp-validator
v1.3.0
Release Notes
Features
- Added generic return data in
schemaValidate
to improve flexibility.
Changes
- Changed required rule to optional rule, with a default value of
false
. This means that the value to validate is required by default.
Full Changelog: v1.2.2...v1.3.0
v1.2.2
Full Changelog: v1.2.1...v1.2.2
- Added a custom message property.
- Separated utility functions into their own file.
- Improved readability of errors.
v1.2.1
Full Changelog: v1.2.0...v1.2.1
v1.2.0
Full Changelog: https://github.com/dncgmh/simp-validator/commits/v1.2.0
Breaking Changes:
GitHub Copilot: Here's a more detailed version of the breaking changes:
- The library will no longer throw any errors. Instead, it will return a
ValidationResult
object with asuccess
property set tofalse
, amessage
property containing the error message, and adetails
property containing the error details. - The
toSchema
function will now return an object instead of a string. The object will contain the schema definition in JSON format. - The
validate
function has been fixed to properly handle arrays and dates. - The duplicated
validate
function has been removed. - The messages have been updated to remove magic string messages and improve readability.
- The library now has 100% code coverage, meaning that all lines of code are covered by unit tests.