[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: how to generate generic errors using Struts validation framework
From: robin bajaj <robinbajaj () gmail ! com>
Date: 2006-10-31 22:21:46
Message-ID: 4547CC7A.9060007 () gmail ! com
[Download RAW message or body]
Hi Everyone,
I am using Struts 1.2 validation framework where I am using the
following elements to mention validation rules for specific action
properties.
<form name="navigatePatientForm">
<field
property="<actionform-property-name>"
depends="required">
<arg0 key="<property-label-name-from-resourcebundle>"/>
</field>
But this only allows me to generate validation errors for specific
ActionForm property names.
I need to know how can I generate GLOBAL validation errors using the
validation.xml file. I know this can be done easily in ActionForm's java
code like:
errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError("error.username.required")
);
Thanks for your help,
robin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic