I use a schema with a required min length for an input schema:
t.Array( ..., { minItems: 1 },)
But when I provide an empty array I get an error like this:
Error in POST /my/path: VALIDATION {"type":"validation","on":"body","found":{"user":{"authProviderId":"dfaeabff"},"resources":[]}}. Thrown at Error: {"type":"validation","on":"body","found":{"user":{"authProviderId":"dfaeabff"},"resources":[]}}
at new _ValidationError (/app/prod/node_modules/elysia/dist/index.mjs:2379:9)
at <anonymous> (:110:49)
at processTicksAndRejections (:12:39)
There is no hint on why the request failed/why the validation failed. Something like: "The array does not match the required length" would be nice. Is this an elysia thing or should I ask @sinclairzx81 over at the typebox repo?
I use a schema with a required min length for an input schema:
But when I provide an empty array I get an error like this:
There is no hint on why the request failed/why the validation failed. Something like: "The array does not match the required length" would be nice. Is this an elysia thing or should I ask @sinclairzx81 over at the typebox repo?