<field-validator type="requiredstring">
<message>password required,enter again</message>
</field-validator>
<field-validator type="fieldexpression">
<param name="expression">password.equals('prernagolani')</param>
<message>invalid password</message>
</field-validator>
</field>
this is the xml file for validation of my password field,but when i submit form with empty string it is showing both the errors
1.invalid password 2.password requir开发者_开发问答ed,enter again
i want if feild is empty then it should show only second message not the first one mentioned above
User Short-circuiting validators: http://struts.apache.org/2.0.14/docs/validation.html#Validation-ShortCircuitingValidator
"A FieldValidator that gets short-circuited will only prevent other FieldValidators for the same field from being evaluated."
精彩评论