This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Releases: adonisjs/validator
Releases · adonisjs/validator
Passing refs to the validate methods
Adding new rules
Rules Added
All of the following rules are related to dates
afterafterFieldafterOrEqualToFieldbeforebeforeFieldbeforeOrEqualToField
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
Updating underlying dependencies
- chore: update dependencies 55a3a3f
Exporting reporters
- feat: export reporters 878ba3d
Adding support for refs and other improvements
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
Getting ready for Typescript 3.9
- improvement: for types after typescript 3.9 release ff2160b
Improvements to the api and json api errors output
- improvement: move api errors inside the errors key 7e4b13f
Adding new rules
Highlights
- Add
regexrule. @gusflopes - Add
uuidrule. @benswinburne - Return error messages as JSON when it's an Ajax request.
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
Adding confirmed rule and pass field name to validate method
Updating underlying dependencies
- chore: update dependencies 7621e42