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
strut validation help
roy joseph
Greenhorn
Posts: 25
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
what's wrong with this code? it wont validate!?
<form name="/home/studentinformation/search"> <field property="studentNo" depends="validwhen,mask"> <msg name="validwhen" key="StudentInformationForm.msg.studentNo.invalid"/> <var> <var-name>test</var-name> <var-value>((searchBy == 'byNo') or (*this* != null))</var-value> </var> <msg name="mask" key="StudentInformationForm.msg.studentNo.invalid"/> <var> <var-name>mask</var-name> <var-value>^\(?(\d{12})\)?$</var-value> </var> </field> <field property="lastName" depends="validwhen,mask"> <msg name="validwhen" key="StudentInformationForm.msg.lastName.invalid"/> <var> <var-name>test</var-name> <var-value>((searchBy == 'byName') or (*this* != null))</var-value> </var> <msg name="mask" key="StudentInformationForm.msg.lastName.invalid"/> <var> <var-name>mask</var-name> <var-value>^[a-zA-Z]*$</var-value> </var> </field> </form>
be annoying .. Aku Soku Zan
roy joseph
Greenhorn
Posts: 25
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
the validwhen is the one that's where im having issues with. the mask is ok. If i remove validwhen then mask is called and everything works.
What i want is that the studentNo and lastName are dependent on the the
string
value of searchBy.
help
be annoying .. Aku Soku Zan
Marc Peabody
pie sneak
Posts: 4727
I like...
posted 19 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are you using javascript or server validation?
Also, which version of
Struts
are you using?
A good workman is known by his tools.
So I left, I came home, and I ate some pie. And then I read this tiny ad:
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
validwhen returns required error messge
Help with validation rules for form with multiple submit buttons
Struts - validation
validate two passwords in struts
why no errors shown for password validation in struts 1.2.4
More...