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
Win a copy of
Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams
this week in the
Agile and Other Processes
forum!
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
Devaka Cooray
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Jeanne Boyarsky
Tim Cooke
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Mikalai Zaikin
Carey Brown
Bartenders:
Forum:
Struts
Struts 2 - Displaying error messages
John Eric Hamacher
Ranch Hand
Posts: 230
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello:
I am trying to set up the validator framework with a form. A typical text field in the form is:
<s:textfield theme="simple" name="city"/>
The city name is required. What tag(s) do I need to use to display validation errors?
Thanks
Eric
Katie Doody
Ranch Hand
Posts: 90
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I think this is what you are looking for.The corresponding xml file used for the validation of your form should have:
<field name="city"> <field-validator type="requiredstring"> <param name="trim">true</param> <message key="yourMessage"/> </field-validator> </field>
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
struts2 select and js
Search best way
A Friend From China
xsd : defining array
how to specify composite data in s struts FORM
More...