commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Czuczor Attila" <>
Subject [Valitator]
Date Thu, 26 Jul 2007 16:12:34 GMT


I am trying to use this framework for a web project, which uses ajax
validation for fields triggered by onChange event on client side.

According to this I can post to the server only the formname,fieldname
and the value parameters.

I spent a lot of time to find out out how should I configure the
validator object to the validate  String or an Intiger.


I copied the code base from the example shipped with commons validator
source so I think that the most part of code and configuration files are


The example name of the form field is age so I initialized the validator
in this way :

Validator validator = new Validator(resources, "ValidateBean", "age");


and use this code to pass the value to validate like this :

validator.setParameter(Validator.FIELD_PARAM, %String or Integer or
whatever% );


Always got the result message that age parameter is required.

I even tried to debug what does it do, and it seemed that validator  is
works only for beans.


Are there any way to validate simple values (not beans) with commons





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message