Any way to get Custom method to run last?

Jun 16, 2013 at 8:43 AM
I have a tricky validation where I need to check if a similar record already exists. By "similar", I mean three out of seven fields match another record in the table.

This seems to require the use of Custom, because it applies to the whole class--not just a particular property. The problem is that I also have some property-level validators.

I'd like to set things up so that the property-level validators run first, and only if they all pass does the Custom validator get run. However, regardless of where I put the call to the Custom method, the Custom validator always seems to run first (and, if it fails, the other validators are not run).

Is this possible in version 4.0?
Jun 17, 2013 at 8:58 AM

When you invoke the validator's Validate method, the rules always run in the same order that they're defined in the validator's constructor. Are you seeing different behaviour to this? If so, please could you put together a unit test that reproduces this and I'll investigate further.