You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/06/24 16:51:10 UTC
DO NOT REPLY [Bug 21051] New: -
javascript required validator accepts fields containing only whitespace
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21051>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21051
javascript required validator accepts fields containing only whitespace
Summary: javascript required validator accepts fields containing
only whitespace
Product: Struts
Version: 1.1RC2
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Validator Framework
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: colin@froggatt.com
We have many form fields that are set up as required using the struts
validation framework. These work fine as long as the value.length of the field
is == 0. However, if the value.length > 0 but all the chars are whitespace
(ie. blank) it passes client validation (incorrect), and fails serverside
validation correctly.
We have worked around the javascript validation by adding a mask validatior
using an RE of "^[^ \t\f\n]*$" to the fields. However this is very cumbersome
for forms with many fields that only need the 'required' validator.
thanks, Colin
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org