Hi Lorenzo,

i submitted a JIRA ticket regarding this issue.
You can't be sure that the form has been validated.

I solved the problem by extending from the form class, override the
process() method and throw an exception if form validation is bypassed.
Not very shiny, but functional.

I hope this form validation bypassing gets fixed soon.

Kind regards,

Moe

Am 10.11.2010 15:57, schrieb Lorenzo Simionato:
> Hi,
> I'm new to Click and i can not understand how to validate a form properly.
> I except the code of my listener method for the submit to be something like 
> this:
> 
> public boolean onSubmit() {
>    if (form.isValid()) {
>       // All ok, process data
>    }
>    return true;
> }
> But isValid returns true even if validation was bypassed, by setting the 
> hidden field
> bypass_validation to true.
> So the question is how can i be sure that the form is valid before processing 
> the data?
> 
> Thanks.
> 
> --
> Lorenzo Simionato

Reply via email to