2021年3月21日星期日

Is it possible to modify the error response of marshmallow

Marshmallow gives a default error response of

"test_field": [      "is a required field"  ]  

is it possible to modify the response in order to achieve

test_field: [      {          new_field: 'error value',          err_message: 'is a required field'      }  ]  

I haven't seen any example on docsany idea on how can I achieve that?

https://stackoverflow.com/questions/66739830/is-it-possible-to-modify-the-error-response-of-marshmallow March 22, 2021 at 11:07AM

没有评论:

发表评论