postgres-json-schema icon indicating copy to clipboard operation
postgres-json-schema copied to clipboard

[Suggestion] Validation error messages

Open romanoff opened this issue 8 years ago • 1 comments
trafficstars

My understanding is that at the moment this extension allows you to get answer if validation failed or succeeded. But would be great if you could also error messages. Possible format:

{"name": ["is required"]}

Not sure about exact format, but that would definitely be useful in some cases (my use-case is trying to process http request in postgres function. And this would provide validation messages )

romanoff avatar Sep 20 '17 20:09 romanoff

I agree, it would be nice to have this. My application doesn't need it because I validate in the application as well, and the check constraint is just for integrity.

It seems pretty hard to implement so I didn't do it, but I would accept a patch that did.

gavinwahl avatar Sep 21 '17 16:09 gavinwahl