I'm trying to validate a file upload field to make sure that the users
uploaded file is of a specific type.  I know this can be done with a
custom manipulator (and in turn a custom validator).  However, I still
want to be able to use the default manipulator for my object for the
rest of the parts of the form.

Is this a case of me trying to have my cake and eat it too?

Im' thinking this would work, but I am wondering if this is the "wrong"
way to go about this....

....
manipulator = my_model.AddManipulator()
manipulator2 = my_model.CustomManipulator()

if request.POST:
     new_data = request.POST.copy()
     errors = manipulator.get_validation_errors(new_data) +
manipulator2.get_validation_errors(new_data)
     .....
     #Not sure exactly how to do the following
     form = formfields.FormWrapper(manipulator, new_data, errors??)
     .....



Thanks,

Babak

Reply via email to