You could write a custom validator that would allow rules to be added
dynamically.  Specify this in your intake group.  

In order to access the validator, you must have access to the field
objects.  You do this by using the intake tool to get the group which,
in turn, can give you the fields.  Once you have the field,
field.getValidator() will give you your custom validator that you
specified in intake.xml.  

After you have added the dynamic rules to the appropriate fields, just
call group.isAllValid() as before.




> -----Original Message-----
> From: Marc Lustig [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, January 15, 2003 8:40 AM
> To: Turbine Users List
> Subject: Intake question: how to add custum rule functions ?
> 
> 
> Hi,
> 
> I need to do some validation on submitted form-fields that 
> are not supported by any of the rule-elements. (E.g. I need 
> to look up the value in a different table.)
> 
> Has anybody successfully added custom rule-functions manually 
> in the action-method, before calling intake.isAllValid() ?
> 
> Actually, my idea is to extend TurbineIntakeService and add 
> methods to validate form-fields individually. First problem 
> is I can't see any methods in TurbineIntakeService to get the 
> form-fields and to mark fields as un/validated (like 
> setFieldAsValidated(String fieldname)).
> 
> Any Intake-expert out there who can give me a hint?
> 
> Marc
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-user-> [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]>

Reply via email to