Rivka Shisman wrote:

Hi Borislav

I did the test and it works fine -
In my form I have:

private int question_no;

public void setQuestion_no(int i) {
    this.question_no = i;
}

public int getQuestion_no() {
   return question_no;
}

public ActionErrors validate(ActionMapping mapping,
           HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
if (action.equals("create")){ if (question_no <= 0) {
                    errors.add("question_no", new                                                   
ActionMessage("error.field.positive_num","מספר שאלה"));
            }
        }
}

I don’t have anything regarding this field in struts-config (should i?)

When I insert "abc" in the html:text field that is related to that integer property - I 
get the error message I expected to get - " the value in question_no field must be 
positive"

Hm, interesting, I didn't try to leave the struts-config empty. The key is in the source code of struts ... I'll debug it a bit ... because such behaviour for me is a bit strange ...

--

Mit freundlichen Grüßen

Borislav Sabev

eventsoft GmbH Max-Planck-Str. 3
85716 Unterschleißheim
Tel: 089 - 35 89 03 21
Fax: 089 - 35 89 03 70

[EMAIL PROTECTED]
www.eventsoft.de


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

Reply via email to