-Igor
On 4/20/06, Ingram Chen
<[EMAIL PROTECTED]> wrote:
hmm.... In my case I always specify label because
(1) RequireValidator use it and lots of fields I used is required.
(2) For locale reason, we must provide chinese label for each field, even for
fields with obvious name like 'date' or 'address'...etc.
well, maybe it's just me...
If we keep using ${input}, I wish that StringValidator can mask input of PasswordField
and support truncating long ${input}. (but it should be configurable, 50 chars is still too
long for easten language like Chinese!)On 4/20/06, Johan Compagner < [EMAIL PROTECTED]> wrote:but if we don't use input but label everywhere by default then a label must be really specified
Because i really don't know when i get
'myTextField' must be at most 12 chars
or
'datefieldX' smaller than 2004/01/01.
What is myTextfield or datefieldX. Is it always one on one or is the Label model always specified?
Input i get. That is on the page i see what input i typed wrong. And with that date i see immediantly both values
compare to each other.
That password thing is wrong for EqualsInputFormValidator we made a special case yesterday.
But we could improve it somehow.
johanOn 4/20/06, Ingram Chen <[EMAIL PROTECTED]> wrote:I have some concern about ${input} in Applicaiton_*.properties, for example:
StringValidator.maximum='${input}' must be at most ${maximum} chars.
Why we use ${input} instead of ${label} here? If I limit maximum of chars as 200
and the user input 201 chars. He/she will get a huge long error message!
case 2: for password field, I will get message like:
'mySecretPassword' must be at most 12 chars.
which make password visible!
case 3: If I have two Date TextField, one is for startDate, the other is for endDate. Both fields are constraint by DateValidator.maximum. If the user input both fields as '2005/02/05'. He will get message:
'2005/02/05' must be smaller than 2004/01/01.
but he/she has no idea which field is wrong!
Is there any reason why we prefer ${input} over ${label} ?
--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen
--
Ingram Chen
Java [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwan
blog: http://www.javaworld.com.tw/roller/page/ingramchen
