Issue Details (XML | Word | Printable)

Key: VALIDATOR-20
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Rostislav Palivoda
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Validator

[validator] validator argument - resource="false" ignored

Created: 28/Feb/06 03:03 AM   Updated: 12/Nov/07 07:25 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: All

Bugzilla Id: 38798


 Description  « Hide
In ValidationResources.java function addOldArgRules does not set value of
“resource”, like:
String resource = attributes.getValue("resource");
if (resource != null && !"".equals(resource)) {
arg.setResource(resource);
}
As a result I've got struts validation message "Field can not be less than null
characters."

Because in config there is defined a value '2' for minlength, but commons.jar
searches for resource with name '2' in resource bundule.

Configuration:

<field property="name"
depends="required,minlength,maxlength">

<arg0 key="fieldForm.name"/>
<arg1
name="minlength"
key="${var:minlength}"
resource="false"
/>
<arg1
name="maxlength"
key="${var:maxlength}"
resource="false"
/>
<var>
<var-name>minlength</var-name>
<var-value>2</var-value>
</var>
<var>
<var-name>maxlength</var-name>
<var-value>4</var-value>
</var>
</field>



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.