next-joi icon indicating copy to clipboard operation
next-joi copied to clipboard

Convert fields

Open sualko opened this issue 4 years ago • 4 comments

This pr adds a new option field which allows to set validation options and replaces the request fields with the converted values. If you do not like this behavior you can pass convert = false as validation option.

@sergioalvz if you do not like to have a breaking change, we should set convert false as default.

Of course we need to create some tests for it.

Fix #9

sualko avatar Jan 24 '22 10:01 sualko

@JeffreySoriano5 if you have time it would be awesome if you could test this pr and give some feedback to the api.

sualko avatar Jan 28 '22 10:01 sualko

@sualko will give it a go

JeffreySoriano5 avatar Jan 31 '22 16:01 JeffreySoriano5

Any update on this?

sualko avatar Feb 23 '22 13:02 sualko

Hi Klaus,

I still need to find some spare time to review this. At first glance, it looks good, but I can tell you I won't approve the PR until there are some unit tests and it gets rid of explicit casting (i.e., as Schema) 🙂

sergioalvz avatar Mar 04 '22 10:03 sergioalvz