struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandra Reichert <reich...@bni-hamburg.de>
Subject ValidatorException: No ValidatorAction named required found for field fieldname
Date Thu, 03 May 2007 10:19:13 GMT
Hi,

Our web application offers two ways for data input.
The first way is an html from. Here the user can enter record by record.
Validation works fine.
The second way is to import data from a .cvs file. I want to use the
same validation.xml file for the validation of these data.

But this Exception occurs:
org.apache.commons.validator.ValidatorException: No ValidatorAction
named required found for field fieldname
	at org.apache.commons.validator.Field.handleMissingAction(Field.java:867)
	at org.apache.commons.validator.Field.validate(Field.java:843)
	at org.apache.commons.validator.Form.validate(Form.java:290)
	at org.apache.commons.validator.Validator.validate(Validator.java:354)


Abstract from UploadAction:
//--------------------------
InputStream in =
this.getClass().getResourceAsStream("validation.xml");	
ValidatorResources resources = new ValidatorResources(in);
									// Construct validator based on the loaded
// resources and the form key
									Validator validator = new Validator(resources, "GeneForm");
									// add the name bean to the validator as a 					// resource for
the validations to be performed on.
									validator.setParameter(Validator.BEAN_PARAM, importGene);			
									// Get results of the validation.
ValidatorResults results = null;
results = validator.validate(); // here the exception occurs
//----------------------------------

Whats`s my mistake?

Thanks a lot
Sandra



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


Mime
View raw message