You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tridev Kodamasingh <Tr...@cramer.com> on 2003/06/04 10:19:42 UTC
struts Validator
Hi,
I am using Dynabeans for validation while using struts validator.
but most of the cases, I am least concerned about the validation results
(it's my requirement..).
As per my understanding , the validator finds out the matched entries
defined in "validation.xml" file and does the validation for specific rule.
Whereas , if no rules are defined, it just ignores them ...
Am I right in my understanding ?
If that is the case, is there anyway, to know beforehand, for which entries
, rules are defined , so that I can only pass the dynabeans for whose
validation entries are defined in Validation.xml ?
For example,
<form name="/name0">
<field property="name0" depends="minlength"
bundle="alternate">
<arg0 key="name0" resource="false"/>
<arg1 key="${var:minlength}" name="minlength"
resource="false"/>
<var>
<var-name>minlength</var-name>
<var-value>11</var-value>
</var>
</field>
</form>
For the above entries, in the Validation.xml, can I know, whether an entry
for form "/name0" is present in the validation.xml or not just before
calling the Struts validator ??
Any idea would be greatly appreciated.
Thanking you .
Tridev