Replies: 4 comments 21 replies
-
Inside If the export const validator: ValidatorConfig = {
existsStrict: true,
} And then make sure you are running |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. I need to pass null as a value when clearing the field but currently the validator strips it. |
Beta Was this translation helpful? Give feedback.
-
same problem here, any update? |
Beta Was this translation helpful? Give feedback.
-
I am working on it this weekend. 👍🏻 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Validator schema:
Route handler in controller:
Now whenever I send
{ description: null }
or{ description: "" }
(any falsy value) to the update request, the validator strips that field entirely. So it doesn't set thedescription
field tonull
even though the column is nullable and I explicitly sentnull
in the request.How can I make the validator return this field as null when it's set to a null value? Is there something like
schema.string.nullable()
?Beta Was this translation helpful? Give feedback.
All reactions