Skip to content

Releases: adonisjs/validator

Bug fixes and added new rule

27 Aug 14:27
Compare
Choose a tag to compare

Bug fixes

  • Fixed beforeField, afterField, beforeOrEqualToField and afterOrEqualToField rules
  • Fixed minLength and maxLength rules to validate the original value length and not the mutated value length.

Addtion

  • Added equalTo rule to ensure the field value equals a static literal value.

Commits

  • chore(deps): bump lodash from 4.17.15 to 4.17.20 (#100) f360554
  • refactor: update rules to accept rulesTree during the compile phase 29c5f45
  • fix: after/before field rules convert value to datetime instance b238710
  • refactor: minLength & maxLength guard against undefine values d86be55
  • fix: minLength and maxLength should check against the original value 71e9b3a
  • chore(package): update dependencies ac08ced
  • feat: add equalTo rule 219deb1

v7.4.1...v7.4.2

Passing refs to the validate methods

12 Aug 08:36
Compare
Choose a tag to compare
  • fix(refs): fix for refs being undefined in validation function (#94) a7b0a02
  • chore: update dependencies 8410fbe
  • chore(deps): bump minimist from 1.2.0 to 1.2.5 (#92) 5cd70e3

v7.4.0...v7.4.1

Adding new rules

26 Jul 07:53
Compare
Choose a tag to compare

Rules Added

All of the following rules are related to dates

  • after
  • afterField
  • afterOrEqualToField
  • before
  • beforeField
  • beforeOrEqualToField

The following rule allows blacklisting keywords. Keywords are matched against string, number and date data types.

  • blacklist

Improvements

The confirmed rule now allows defining a custom field name. Helpful when you are accepting all data in camelCase and just one field is in snake case.

rules.confirmed('passwordConfirmation')

Commits

  • style: comment out example code a2680fa
  • chore: update dependencies 63633ca
  • docs(README): update links 75badc1
  • docs(README): update tagline fe3c8b2
  • docs(README): update readme file a1d4c7a
  • refactor: make errors more consistent 3b42ca3
  • feat: add blacklist rule c25e22b
  • feat: add more date comparison rules 0a0001f
  • feat: add resolveAbsoluteName helper e639c6c
  • refactor: improvements to the confirmed rule error output af1429b
  • feat: add before,after,beforeField and afterField rules 39d4bf8
  • test: add provider test 9a8d852
  • improvement: do not flash _method during validation exception d01e16b
  • feat(confirmed): add support for defining custom field name 53c8624
  • feat: add schema.object.anyMembers to be compatible with array signature 17722ea
  • chore: remove pope dependency c8730be
  • chore: remove endent dependency d763909
  • chore: format/update meta files 8f046e3
  • chore: update dependencies 43c08a1
  • chore(release): 7.3.2 a27c190
  • feat: add range rule (#89) 53b4b96
  • fix: Add 'true' and 'false' to boolean value (#86) (#87) 86f5486
  • chore: update dependencies 55a3a3f

v7.3.1...v7.4.0

Updating underlying dependencies

19 Jun 06:50
Compare
Choose a tag to compare

Exporting reporters

15 Jun 04:25
Compare
Choose a tag to compare

Adding support for refs and other improvements

14 Jun 10:37
Compare
Choose a tag to compare

Refs

Refs allows referencing runtime values in the cached schema. Read the official docs to learn how it works.

https://preview.adonisjs.com/guides/validator/schema-caching#option-3-using-refs

  • docs: update benchmark image ac4cd3e
  • fix: types 2120229
  • improvement: turn off string trimming by default e503450
  • improvement: export isRef in helpers 4e3f0a2
  • improvement(requiredWhen): add support for refs 65af941
  • feat: export helpers required for adding custom rules 86a7120
  • feat: add distinct rule 3d9422a
  • improvement: scope min and max validations to their node subtype 5794257
  • feat(alpha): add support for allowing "space", "dash" and "underscore" 207c4f1
  • refactor: depereciate "addType" and "addRule" in favor of "type" and "rule" c2f1486
  • feat: add support for wildcard messages handler ed5a673
  • improvement: pass validation options to the error reporter da76275
  • refactor: ip rule accept version as a number 620d38f
  • refactor: cleanup validation rules compile functions c764e67
  • test: fix breaking tests 54acbdc
  • chore: update dependencies bd4c554
  • feat: add support for refs 88df5b5
  • improvement(boolean): handle "on" and "off" string. cd0a401
  • feat: add support for micro templating 9d08a27
  • chore: update dependencies 4524097
  • fix: requiredWhen - for values: false and 0 (#83) 29bf541

v7.2.1...v7.3.0

Getting ready for Typescript 3.9

14 May 17:30
Compare
Choose a tag to compare
  • improvement: for types after typescript 3.9 release ff2160b

v7.2.0...v7.2.1

Improvements to the api and json api errors output

27 Apr 17:18
Compare
Choose a tag to compare
  • improvement: move api errors inside the errors key 7e4b13f

v7.1.0...v7.2.0

Adding new rules

27 Apr 05:15
Compare
Choose a tag to compare

Highlights

Commits

  • improvement: hardening regex rule 4b54690
  • refactor: use ternary operator afe988d
  • improvement: convert regex rule to string during compile phase c46a2c8
  • improvement: show messages as json when its an ajax request aa99e00
  • chore: update dependencies 38d2ef4
  • feat: added uuid validation rule (#80) 142d025
  • feat: RegExp validation rule (#81) 9b8430e
  • refactor: use _csrf field when ignoring its value from flash messages 5584c97
  • chore: update dependencies 88341c2

v7.0.3...v7.1.0

Adding confirmed rule and pass field name to validate method

20 Apr 10:18
Compare
Choose a tag to compare
  • feat: add confirmed rule 176d6bc
  • feat: pass field to validation functions, it is the name of field inside tip 78982ab
  • chore: update dependencies 5ba978f

v7.0.2...v7.0.3