Author: matzew
Date: Mon Dec 18 07:49:48 2006
New Revision: 488307
URL: http://svn.apache.org/viewvc?view=rev&rev=488307
Log:
overhauling the TrLengthValidator (part I)
Modified:
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Modified:
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
URL:
http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js?view=diff&rev=488307&r1=488306&r2=488307
==============================================================================
---
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
(original)
+++
incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/CoreFormat.js
Mon Dec 18 07:49:48 2006
@@ -409,12 +409,22 @@
}
else
{
- facesMessage =
_createFacesMessage("org.apache.myfaces.trinidad.validator.LengthValidator.NOT_IN_RANGE",
+ if(length < this._minValue) //to short
+ {
+ facesMessage =
_createFacesMessage("org.apache.myfaces.trinidad.validator.LengthValidator.MINIMUM",
+ label,
+ string,
+ ""+this._minValue);
+ throw new TrConverterException(facesMessage);
+ }
+ if(length > this._maxValue) //to long
+ {
+ facesMessage =
_createFacesMessage("org.apache.myfaces.trinidad.validator.LengthValidator.MAXIMUM",
label,
string,
- ""+this._minValue,
""+this._maxValue);
- throw new TrConverterException(facesMessage);
+ throw new TrConverterException(facesMessage);
+ }
}
}