I did try the following, but it throws a NPE when I try to get the mapping:
ModuleConfig mConfig = mapping.getModuleConfig(); ActionMapping aMapping = (ActionMapping) mConfig.findActionConfig("/saveCMCF"); errors = theForm.validate(aMapping, request); if (!errors.isEmpty()) { saveErrors(request, errors); } Any assistance is appreciated, Matt > -----Original Message----- > From: Raible, Matt > Sent: Monday, January 20, 2003 4:50 PM > To: '[EMAIL PROTECTED]' > Subject: Validating in an action before displaying a form > > > I have a unique situation (IMO) where I am populating a > ValidatorForm from > the database, and then I want to "validate" it and create ActionErrors > before displaying the form. My mapping for the > edit/retrieval does not > reference the form - therefore, in order to call > > ActionErrors errors = myForm.validate(mapping, request); > > More info on this method at http://tinyurl.com/4ofh > > I need to get the mapping for the action that does the save, > and I can get > the ActionConfig - but will this get me the mapping I need? > > Thanks, > > Matt > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>