struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <ekb...@swbell.net>
Subject Re: validate
Date Mon, 16 Dec 2002 23:28:07 GMT
I'd at least check for ((x != null) && (!"".equals(x.trim()))) for 
required (String) fields.

... better yet, use the StrutsValidator.  That'll make it a lot easier 
on ya.

Khalid K. wrote:

>if text field accepts any character (which includes, newline/cr, blank, tab,
>etc)
>all you need to validate is if object returned is null....
>example:
>in u request object, you stored a parameter x with value y,
>you can check... if (x == null)   error, else move on...
>since your text field can take any value, u dont need to check for anything
>else..
>
>Khalid
>

-- 
Eddie Bush





--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message