
|
If you were logged in you would be able to see more operations.
|
|
|
|
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>
|
|
Description
|
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> |
Show » |
|