Yusuke Wada
9c4197a772
feat(validator): support type transformation ( #969 )
...
* feat(validator): support type transformation
* denoify
* create `ValidationFunction` and add a test
* denoify
* rename
* denoify
2023-03-11 22:17:08 +09:00
Yusuke Wada
b788fe619f
fix(validator): clone Request object if json
or form
( #926 )
2023-02-25 02:36:11 +09:00
Yusuke Wada
68cbbbcde7
refactor: rename ValidationTypes
to ValidationTargets
( #890 )
...
* refactor: rename `ValidationTypes` to `ValidationTargets`
* denoify
2023-02-14 06:21:30 +09:00
Yusuke Wada
17af727d49
feat(validator): moved validator outside of middleware ( #879 )
2023-02-11 01:18:27 +09:00
Yusuke Wada
85e3c6a275
feat: new validator middleware using 3rd-party & current middleware obsolete ( #745 )
...
* feat: introduce HonoRequest with "wrapper pattern" (#733 )
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
* feat: types for "RPC" support & build-in validator obsolete
* feat: introduce HonoRequest with "wrapper pattern" (#733 )
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
* create generic middleare for 3rd-party validator
* indent
* support multiple validators and refactor
* remove unsed lines
* denoify
2023-01-19 22:40:13 +09:00
Yusuke Wada
a6d54dbff3
feat: introduce HonoRequest with "wrapper pattern" ( #733 )
...
* feat: HonoRequest
* avoid `awaits`
* use `raw` instead of `original`
2023-01-19 22:40:13 +09:00
Yusuke Wada
b1973d0c7f
fix(type): make SchemaToProp
work correctly ( #720 )
2022-12-13 17:22:33 +09:00
Yusuke Wada
fdea3b1cc6
fix(type): infer types correctly ( #715 )
2022-12-11 11:05:30 +09:00
Yusuke Wada
a5b8b44793
fix(validator): enable checking undefined
in rules ( #708 )
2022-12-08 21:45:54 +09:00
Dario Piotrowicz
1f43164da5
Fix Validation of optional empty/undefined arrays ( #690 )
...
* * fix(validator): allow empty and undefined optional arrays
fix the bug of empty and undefined array causing a validation fail
when those are anyways optional
resolves #677
* denonify changes
2022-11-30 19:48:43 +09:00
Dario Piotrowicz
07efdb5103
fix(validator): fix subsequent nested objects names ( #683 )
...
* fix(validator): fix subsequent nested objects names
fix the bug of having subsequent objects inside a nested structure
causing the validator to forget the previous keys in the scheme's path
fixes point 1 of #677
* deonify changes
2022-11-29 22:02:20 +09:00
Yusuke Wada
9f7b5de9aa
chore: denoify
2022-11-28 08:45:57 +09:00
Jayden
e92dbe9558
fix(sanitizer) ( #661 )
...
* Add test for #660
* Implement sanitizeValue
* Mark sanitizeValue private
2022-11-12 20:33:18 +09:00
Yusuke Wada
c14dd5ad43
feat(validator): support v.queries
( #636 )
2022-11-01 14:22:04 +09:00
Yusuke Wada
7b8a25126f
fix(validator): enable handling "Bad Request" in validator ( #635 )
2022-11-01 00:03:17 +09:00
Yusuke Wada
b4d58eca64
test(validator): add test for custom rules ( #620 )
...
* test(validator): add test for custom rules
* fixed value
2022-10-23 10:11:18 +09:00
Yusuke Wada
8627010094
refactor(types): refactor and add tests for checking Types ( #615 )
...
* refactor(types): refactor and add tests for checking Types
* remove unused
* uncomment
* use `Handler` in validator middleware
* remove unused
* create `src/validator` dir and move some files into it
* add the case that the context is in `validator`
* rename `D` to `S`
2022-10-23 08:10:00 +09:00