Dear All:

I have two problems with Validator. I'm using Struts 1.3.5, Tomcat 6.0.9 and Java 1.6: 1) I have a form property that is an integer. When I set its validation rule to "integer", it
has no effect.
- The form field is populated with a zero value even if a letter is typed in the form instead of a number. How do I make sure that a typing a string would result in a validation error? - Should I use Strings for all my form properties or can I use integers? Or Integers? - I am using PropertyUtil.copyProperties(). If I use Strings for all my form properties and integers in my model's data transfer object, would it automatically convert the type of variables in this method?

2) A "validwhen" test condition seems to be ignored:
               <var>
                  <var-name>test</var-name>
<var-value>((*this* != null) or (newChildForm.comment == null))</var-value>
               </var>
This has a reference to a nested property of the form. Is that OK to use it in a test condition?

Thanks,
Oren

--
======================================================================
Oren Livne, Ph.D.
Research Assistant Professor of Mathematics
RUReady Software Architect

Academic Outreach and Continuing Education
1901 East South Campus Dr., Room 2197-D
University of Utah, Salt Lake City, UT 84112-9399
Tel  : (801) 581-6831     Cell: (801) 631-3885     Fax: (801) 585-5414
Email: [EMAIL PROTECTED]              Web:  http://ruready.net/oren
======================================================================

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

Reply via email to