Hi,

We are running into what we think is a bug with monorail validation.
Essentially, we need to submit and save several instances of the same
type in one go.

We are using arrays, but the validation doesn't seem to be working.
We think we have found the issue going through the code and running
some tests.

Basically, the DataBinder successfully binds the array and fills a
dictionary with the instances
of the array and their ErrorSummary.

The problem is that, because the Controller uses its own dictionary
for storing validation errors,
when it tries to get the errors for the array from the binder, it uses
the array reference instead of individual
instances, nothing is found in the Binder dictionary and the
validation passes as if there were no errors.

We have thought of some options to fix this problem. We could change
the code to copy the whole dictionary
of validation errors from the binder, which we would not like to do as
it probably breaks the design between
Controller and Binder. We could also try to use the array instance as
a key in the binder dictionary, but have not
looked into what implications this would have when rendering the
response. Finally, we could modify the controller
to ask for the individual entries of the array after it has been
bound.

We would like to help fix this with a patch, but would appreciate some
pointers on the best way
to solve the issue.

This would seem to be a very common use of the framework and we were
wondering if it is a design decision
to validate instances separately or if it is common practice.


Thanks,

Alfonso

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to