Skip to content

Releases: arkstack-hq/kanun

1.0.10

22 Mar 13:45

Choose a tag to compare

What's Changed

Changes

  • Add ValidationRuleOutputTypeMap interface and update related validation logic
  • Enhance validation logic by adding file value handling and ASCII control character checks
  • Enhance validation logic to prioritize request-scoped file values and update tests accordingly

Fixes

  • Dynamically generated file instances failing validation for the file plugin have been fixed.

Full Changelog: 1.0.4...1.0.10

1.0.5

20 Mar 13:32

Choose a tag to compare

What's Changed

  • Add new validation rules, including email options, prohibited rules, and distinct checks
  • Enhance existing validation rules

Full Changelog: 1.0.4...1.0.5

1.0.4

18 Mar 15:25

Choose a tag to compare

What's Changed

  • feat: add support for required rule in upload contexts for Express, Fastify, Hono, and H3 with real request instances
  • feat: enhance validation rules for file uploads in Express, Fastify, Hono, and H3 request instances

Full Changelog: 1.0.3...1.0.4

1.0.3

18 Mar 14:41

Choose a tag to compare

What's Changed

  • fix: file plugin only resolves uploads inside its own rules, while required only looks at form/body data, causing the required rule to fail for files even when files are present.

Full Changelog: 1.0.2...1.0.3

1.0.2

17 Mar 18:33

Choose a tag to compare

What's Changed

  • add rule autocomplete support for plugins and update type definitions

Full Changelog: 1.0.1...1.0.2

1.0.1

17 Mar 17:21

Choose a tag to compare

What's Changed

  • clean up imports and improve type safety in validation logic
  • Implemented a new kanun-plugin-file file validation plugin that integrates with the kanun validation library.
  • Added support for validating image dimensions, file extensions, and MIME types on the kanun-plugin-file file validation plugin.
  • Created utility functions for handling file-like objects and normalising input kanun-plugin-file file validation plugin.
  • Introduced a context management system for handling request-scoped file uploads.
  • Developed tests for validating file uploads across various frameworks (Express, Fastify, Hono, H3) kanun-plugin-file file validation plugin.
  • Added TypeScript definitions for file-related types and validation rules.
  • Implement plugin system for the validation library.

Full Changelog: 0.1.8...1.0.1

0.1.8

17 Mar 02:11

Choose a tag to compare

What's Changed

  • fix: add statusCode property to ValidationException class
  • fix: improve validation messages in Arabic, English, and French locales
  • fix: specify file extension for dayjs plugin import
  • fix: add dayjs dependency, and enhance validation rules with new datetime and exists checks

Full Changelog: 0.1.4...0.1.8

0.1.4

11 Mar 17:36

Choose a tag to compare

What's Changed

  • fix: enhance type safety in validator classes

Full Changelog: 0.1.0...0.1.4

0.1.0

02 Mar 09:40

Choose a tag to compare

Added

  • Add ImplicitRule and ValidationRule classes for defining validation rules.
  • Introduce ExtendedRules class with additional validation methods (hex, includes, not_includes, datetime, exists, unique).
  • Create ValidationServiceProvider for managing validation services.
  • Implement ValidationException for structured error handling.
  • Develop MessageBag utility for managing validation messages.
  • Add Validator class to orchestrate validation logic and error reporting.
  • Create tests for Validator and validation rules to ensure functionality.
  • Set up TypeScript configuration and testing environment with Vitest.

Full Changelog: https://github.com/arcstack-hq/kanun/commits/0.1.0