Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
how to do the basic validation(only confirm none of the fields is blank)
Artemesia Lakener
Ranch Hand
Posts: 162
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I only need to do the very basic validation that makes sure no field is left unfilled, that's it. Please advise me how to do that. Shall I just
set validate="true" in the struts-config
what else do I need to do ?
sarvesh khatri
Greenhorn
Posts: 4
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
making validate = true will only tell
Struts
frame work to call validate method of the form bean associated with this action.
You have to use Struts validator
Following links will help
http://jakarta.apache.org/commons/validator/
http://www.oracle.com/technology/oramag/oracle/04-jan/o14dev_struts.html
MInu
Ranch Hand
Posts: 517
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Change your validation.xml file
<form name="formName">
<field property="property1" depends="required">
<arg0 name="required" key="message"/>
</field>
God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to format the number
struts2 validation with conditions!
do i have to use session here ?
struts validator
JSF - Client Side validation
More...