That's the exact intention I had while putting in regex validation i.e., to
provide basic validation.
 
btw, I havn't seen any comment regarding automatic properties. For us, its
saving a lot of time as we are not worried about prepopulating the input
fields if some validation fails.
Another scenario is for dynamic html forms. Like we have an input form where
user can input any number of email addresses. Default is 1 and he can click
"Add Email" and the same form will be displayed with an additional text box
and all the already entered values intact. And all this is done by framework
without any custom coding in JSP or beans.
 
Any idea how to wake up committers for struts-dev?
 
Tahir Awan
 

-----Original Message-----
From: Cook, Levi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: development issues



Surely I'm reiterating the obvious here, but Javascript alone cannot/should
not be relied upon for validation. It does play a useful and important role,
however its scope should normally be limited to improving the users
experience with supplying input that our system understands. If the
framework provides a facility for sending Javascript to the browser, I would
propose including a mechanism that allows the developer to specify which
browsers their script can safely run in.

Its just a quick observation, but the role of validation within Struts (a
web app. framework) should be limited validating user input. This is closely
related to the role an ActionForm plays by representing user input as
Strings. Therefore, IMHO, the goal of Struts validation should simply be to
ensure user supplied input can safely be converted into the objects &
primitives our domain objects expect. Within this context, validating user
input, regular expressions are very valuable and powerful and should be made
available.

As someone else stated earlier, domain specific validations can, and
normally do, require more sophisticated mechanisms than regular expressions
alone provide. In general, I would not advise that anyone make their domain
validations dependant on the validation facilities that Struts or JavaScript
provide.

Anyway, that my 2 cents, 
Levi Cook 
Greenbrier & Russel 
Madison, Wisconsin 
www.gr.com 
[EMAIL PROTECTED] 


-----Original Message----- 
From: Jim Richards [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] 
Sent: Tuesday, March 27, 2001 9:04 AM 
To: [EMAIL PROTECTED] 
Subject: RE: development issues 



>But its not bad either for basic form validation (null, range checks &
like) 
>and much better than using Javascript. I dont think any backend will rely 
>upon JSP validation and wont perform its own tests prior to saving the
data. 

Well, one of the 1.1 discussions is client side validation using JavaScript,

which as of JavaScript1.2 has regext facilties built in, so I'd expect
they'd 
be used. But that stops older browsers from working. But as you point out, 
server side validation should be done as well to correctly check the data 
against a greater number of tests. 


-- 
Kumera - a new Open Source Content Management System 
for small to medium web sites written in Perl and using XML 
http://www.cyber4.org/kumera/index.html
<http://www.cyber4.org/kumera/index.html>  

Reply via email to