You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The validator crashed while trying to validate a File upload with an error Cannot read properties of undefined (reading 'length') .
The schema like this works fine:
const file = Joi.object<File>().label("File");
But as soon as I try to add the fields to validate it crashes.
This isn't a resolver issue, but a Joi issue. As I'm not familiar with Joi, I can't help you with using Joi validation for File uploads. The error you're seeing is a TypeError: Illegal invocation.
Describe the bug
The validator crashed while trying to validate a File upload with an error
Cannot read properties of undefined (reading 'length')
.The schema like this works fine:
But as soon as I try to add the fields to validate it crashes.
To Reproduce
Steps to reproduce the behavior:
Codesandbox link (Required)
https://codesandbox.io/p/sandbox/joi-error-hcktkx?file=%2Fsrc%2FApp.tsx%3A19%2C42
Expected behavior
Such an error should not appear.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: