#Odd validation error

12 messages · Page 1 of 1 (latest)

stark field
#

Hey, I'm trying to add validation to my webhook controller via a dto. I have done this successfully with all of my other gql resolvers, but for whatever reason the dto is not applying the validation/transformer at all whatsoever. I have tested it for false values and it doesn't do any sort of validation. Any idea why it would work for gql and not for an http request?

placid sleet
#

What errors are you getting? What's the incoming request? Does it have a body that can properly be deserialized by the appropriate content handler?

stark field
#

I'm using @IsArray() on a string and it throws no error

placid sleet
#

What's the request look like? How are you binding the pipe?

stark field
#

The request is a webhook which is a fairly large object

placid sleet
#

And you're not doing import type, right?

stark field
#

No sir

placid sleet
#

Hmmm. Validation should be working then

stark field
#

It’s just bizarre to me that it works w/ gql and not http