[Logo]
Forums Register Login
Struts 2 validation using Annotation is not working
I'm doing validation for Name,but it seems there some problem (it's not working)

login.jsp


My Value Object has


struts.xml (piece of my struts.xml)



I really don't know what is the reason,why it's not validating

Thank You
Hi ,

In the Form you have to add Validation= "true" like below. Try this it will work.


<s:form action="AnnotationAction" method="POST" validate="true">

Regards,
Surendra
i forgot to see , the Model validation :P

So,how to validate a long value ?? ,i can't use


which give an TypeConversion error, so what can i do,i'm not getting it,how can i solve the issue.
Use Double , it's working fine!
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 14, 2017 18:02:13.