| Author |
Validation problem with Struts1.2
|
sudhakar Tadepalli
Ranch Hand
Joined: Dec 27, 2001
Posts: 130
|
|
Hi, The following validation is working with my old struts.jsr file. If I replace with Srruts1.2, validation fails any idea please. <form name="/login"> <field property="userName" depends="required" > <arg0 key="Heloo User Name please" resource="false"/> </field> <field property="password" depends="required" > <arg0 key="Heloo Password please" resource="false"/> </field> </form> Could some one explain how to validate a dropdown if defult value is "Select".(User must select other than "Select" from the dropdown) Thanks Sudhakar
|
 |
Vicky Mohan
Ranch Hand
Joined: Oct 14, 2004
Posts: 130
|
|
I am not sure if this is the best possible solution, but you can have the value as empty space for SELECT option. Now, having a validation rule as REQUIRED might trigger an alert message. Hope this helps you.
|
 |
sudhakar Tadepalli
Ranch Hand
Joined: Dec 27, 2001
Posts: 130
|
|
Vijay, I have this in validation.xml and value for the "Select" made as empty, then validation started working but not sure how Is there any other way without taking out the value ? <field property="selectbox" depends="requiredif"> <arg0 key="Heloo select dorpdown please" resource="false"/> <var> <var-name>test</var-name> <var-value>((selectbox == null) or (*this* == "Select"))</var-value> </var> </field> Thanks Sudhakar
|
 |
martin jose
Greenhorn
Joined: Aug 10, 2005
Posts: 9
|
|
Hi Sudhakar, My struts1.2 validation is working perfectly, but we don't have any plugin support for struts1.2 in eclipse. So I have to do the validation in struts1.1 itself. I am not getting any help for 1.1 validation. I am doing the same thing in both, but only 1.2 is working. In 1.1 it is simply ignoring the validation. Is there any difference in validation.xml entries. Please give me some tips. Thanks in advance Martin
|
 |
 |
|
|
subject: Validation problem with Struts1.2
|
|
|