Closed shaverlee closed 5 years ago
Thanks for inspecting your issue!
But, this is not a bug, it's the intended purpose.
The validator default value wins over the action default value. (and the validator default value, by default is None
).
You have to use @validate(validators={'id' : validators.Int(if_empty=0)})
` @validate(validators={'id' : validators.Int()}) @expose('json') def post(self, id=0) : assert(id == 0)
xxx.post() ` id will get a value None, instead of it's default value 0