If we specify some fields to ignore they are still getting validated.
The following test fails
[Test]
> public void IgnoredFieldsNotValidated()
> {
> var args = new NameValueCollection { { "person.Email",
> string.Empty }};
> object instance = binder.BindObject(typeof(Person),
> "person","person.Email",null, builder.BuildSourceNode(args));
>
> Assert.IsNotNull(instance);
> Assert.AreEqual(0, binder.ErrorList.Count);
> }
>
Expected: 0
> But was: 1
>
The best solutions would be to add a call to ShouldIgnoreProperty in the
function CheckForValidationFailures, the validation will still be done but
it won't be added to the error list. Because it seems that it will be too
muche complicated to add the ignored properties list to the validation
interface (IValidatorRunner and IValidatorPerformer).
no ?
--
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-devel/-/Oks1eu7Ehi8J.
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.