History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-1117
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Rainer Hermanns
Reporter: Rainer Hermanns
Votes: 0
Watchers: 0
Operations

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

int validator in javascript throws exception if only min or max are set

Created: 24/Jan/06 07:20 AM   Updated: 24/Jan/06 07:22 AM
Component/s: Views
Affects Version/s: 2.2
Fix Version/s: 2.2.1


 Description  « Hide
Issue submitted by Eugene Schava with patch:

I try to use int validator in javascript. I have found a bug: if i use only
only parameter (min or max) - freemarker throws an exception because another
parameter value is null... My offer:

<#elseif validator.validatorType = "int">
            if (field.value != null) {
                if (<#if validator.min?exists>parseInt(field.value) <
${validator.min}<#else>false</#if> ||
                        <#if validator.max?exists>parseInt(field.value) >
${validator.max}<#else>false</#if>) {
                    addError(field, error);
                    errors = true;
                }
            }
            </#if>

 All   Comments   Change History      Sort Order:
Rainer Hermanns - [24/Jan/06 07:22 AM ]
fixed in CVS HEAD, thanks for the patch