I am using struts validator framework for both client and server side
validations. The problem is validations of the same type occur together. But
I want all validations for a particular field to be finished first and if
that field passes all validations, then only validations for the next field
should take place and so on.
ex: say I have two text fields.
field 1: validations are: required, mask (checks a regular expression)
field 2: validations are : required, integer

if both the fields are empty,on click of submit button an alert is shown as:
field 1 is required
field 2 is required

but I want validation to stop after reporting validation error for field 1
only. Once both the validations for field 1 are done, then only it should
alert for the second field. What I mean is, suppose field 1 is empty, then
on click of submit button the alert should say "field 1 is required" only. I
enter something into field 1 and click submit and the alert now may say
something like "Please enter numeric value for field 1". That means all
validations for field 1 should complete first before validator goes for the
next field.

Please help. I also tried with the "stopOnError" property
in the plug-in tag in struts-config.xml, but it didn't work out.

I thoght that stopOnError=true will help me achieve what i want to achieve.
Now I am confused about its use.
-- 
View this message in context: 
http://www.nabble.com/Struts-validator-tf3346336.html#a9305702
Sent from the Struts - User mailing list archive at Nabble.com.

Reply via email to