@ValidationMethod(on = {"register", "saveChanges"})
     public void validateEmail(ValidationErrors errors) {
         if(isNoVAlidStuffSubmitted)
             errors.addGlobalError(new SimpleError("Das geht so ni hier!"));
}

2010/2/7 Michal Kováč <[email protected]>:
> Hey, I'm trying to make a validation method for one project.
>
>     @ValidationMethod(on = {"register", "saveChanges"})
>     public boolean validateEmail() {
>         ....
>         return result;
>     }
>
> I want this method to be called before event register() is called and I want
> it to prevent register() from running if the result is false and show error
> message.
>
> Problem is, even though the method returns false, register is called. How to
> solve this?
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>



-- 
Richard Hauswald
Blog: http://tnfstacc.blogspot.com/
LinkedIn: http://www.linkedin.com/in/richardhauswald
Xing: http://www.xing.com/profile/Richard_Hauswald

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to