Aneesh Anvar

Greenhorn
+ Follow
since Oct 08, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aneesh Anvar

hi raza,
i added the validate="true " in the form...The rest you wrote "You can populate value and then make it disable ...it will work with validation.xml. "
i couldnt make out. Coould you please explain much more clear...
13 years ago
hi raza,
thank you for the reply.. But the validate method will make it a server side validation. I need a perfect client side validation..
If i give it in validate method, then like that field( username), if any other field requires such kind of validation, then the code ll become messy...
If we ve any generic condtion in xml, thinhs ll be pretty easy
13 years ago
hi Raza,

i am using struts2 validators... Here goes my validation.xml. here the firstname should be given a condition, like only if firstname is present in the jsp page then the validation should happen, otherwise dont take the validation code... But the validation code for the firstname wll always be presernt in the validation.xml...
This is my requirement.. i think now you got a better understanding of the problem...

<validators>
<field name="firstName">
<field-validator type="requiredstring">
<message key="validator.requiredstring"/>
</field-validator>
<field-validator type="stringlength">
<param name="minLength">1</param>
<param name="maxLength">30</param>
<message key="validator.stringlength"/>
</field-validator>
</field>
<validators>
13 years ago
i've a field, which is validated client side in validation.xml..
But i want to make a generic validation.xml so that only when a particular field(say username) is present, it should validate, otherwise no need to validate..
But the code for the validation always remains there, for the field..If its present it ll validate, otherwise no... but in validation.xml, it wont support any condition like
(if username)
{
code for validate..
}

need to find out a new solution
13 years ago
I have a field in my application. but for some users that field will be disabled..
but if the field is displaying, it should be validated.. and no validation if it is disabled.
I'm using Struts2 and XML validation..

Can anyone help me in solving this issue?
13 years ago