Betty Koon wrote:
Matt,

Have you tried putting just white spaces in the field for first name in the
third test case.  It will pass which is incorrect, that's the part I don't
understand and got stucked on.  It looked like validwhen treated all
whitespace string value for a field the same way as the field is null.

-Betty



Betty -

I did some more testing, then went looking into validator code. You are correct on this.

In the struts validator code, the validators all check to make sure that the field is not blank or null in addition to doing whatever the actual validation is.

The reasoning behind this (I think) is that the required validator is supposed to handle blank/null values. It obviously becomes a problem though when you want to do something like you are attempting. I'm not sure there is a way around it with the current version of validator...


Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to