----- Original Message ----- From: "Joe Germuska" <[EMAIL PROTECTED]>
To: "Frank Burns" <[EMAIL PROTECTED]>; "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, November 21, 2004 2:20 PM
Subject: Re: Want to reject all-whitespace text input.
The "required" validator should do what you need. It requires that the value be non-null and have at length > 0 after String.trim() is called.
Joe
At 1:22 PM +0000 11/21/04, Frank Burns wrote:Hi,
I am trying to write a regular expression for a mask, for use in the validation.xml file, that will reject input text that consists of all whitespace characters. But, no matter what pattern I try, an all-whitespace entry is always accepted.
Is there some strange rule, as part of the Validator's validation process, that always accepts whitespace? Or is there something else going on?
Do I have to resort to accepting the all-whitespace input, detecting it in the ActionForm's validate method and manually setting a message in ActionErrors?
Thanks,
Frank.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]