Adam Winer wrote:
On 5/22/07, Blake Sullivan <[EMAIL PROTECTED]> wrote:
Adam Winer wrote:
> The Trinidad subclass of LengthValidator needs some work.
> Changes I plan to make - feedback appreciated:
>
> - The messages are copied from the LongRangeValidator, so
> we say "Enter a value greater than or equal to 5" instead
> of "Enter a value of 5 or more characters". (I'll use the latter)
Do surrogates count as a character?
At this time, they count as a character. That's bogus,
but is an issue in the JSF implementation. (It's
also an issue that is a nightmare for our JS code.)
As long as we suck consistently between the client and the server. :)
-- Blake
-- Adam
-- Blake Sullivan
>
> - If min and max are the same, we don't have a custom message,
> so you'd get something like "Enter a value between 5 and 5
> characters". Looks silly. So, in addition to
> LengthValidator.NOT_IN_RANGE, I'll add LengthValidator.EXACT.
>
> - The override of Validate assumes the value is a Number!, and
> lots of Javadoc is cut-and-pasted from LongRangeValidator,
> it would seem... Thankfully, there's an instanceof check,
> so no ClassCastExceptions but this code has to just be broken...
>
> -- Adam