Skip to content

Releases: dncgmh/simp-validator

v1.3.0

01 Jun 08:13
Compare
Choose a tag to compare

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

26 May 07:39
Compare
Choose a tag to compare

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

26 May 04:30
Compare
Choose a tag to compare

Full Changelog: v1.2.0...v1.2.1

v1.2.0

26 May 03:51
Compare
Choose a tag to compare

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 a success property set to false, a message property containing the error message, and a details 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.