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:
Tim Cooke
Campbell Ritchie
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
Struts
validation doubt
Rauhl Roy
Ranch Hand
Posts: 401
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how to make my text box a must field and number only should be entered field through validations.xml
i know that by declaring REQIRED in validation we can make a field must entred. but i do not know about number only should be entred. pls help me
both are on the same field here
thanks in advance
rahul
Sujay Ramasamy
Greenhorn
Posts: 4
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi rahul
You have to use mask rule and specify in properties file your alert alert
I am validating zip code, zipcode contain only no.
<field property="address.zipCode" depends="maxlength,mask"> <msg name="mask" key="errors.invalid" /> <arg0 key="contactDetails.zipCode" /> <arg1 name="maxlength" key="${var:maxlength}" resource="false" /> <var> <var-name>maxlength</var-name> <var-value>5</var-value> </var> <var> <var-name>mask</var-name> <var-value>^[0-9]*$</var-value> </var> </field>
Rauhl Roy
Ranch Hand
Posts: 401
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank you very much
Nyanas Kandhan
Ranch Hand
Posts: 35
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
To restrict the user to enter only numbers you need to use mask rule in
struts
. For an example on this refer here.
Mask Validation in Struts
regards,
Nyanaskandhan
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
URLyBird search for the database records issue - advice needed
Are validations needed on the frontend GUI
Jtable Cell editing validations
NX: handling of Remote- and ParseException
Multiple field validation in Struts2 Validation using validation.xml file
More...