
Aug. 14, 2014
7:34 p.m.
On Thu, Aug 14, 2014 at 2:28 PM, Dennis Brakhane <brakhane@googlemail.com> wrote:
public Response register(@Range(18,100) int age, @ValidEmail String email) { ... }
The framework would check the range of the age parameter and the validity of the email and if there are validation errors, refusing the request with a suitable error message without ever calling our function.
Couldn't you do that today in Python with a suitably sophisticated function decorator? The range/type checking would happen before the user's actual function is called. Skip