DarthFubuMVC/fubuvalidation — pull request #49 by kharlamov (2013-08-08 13:19:45+00:00)
Title: Added ability to create an inline validation rule.

Not sure if there is anything like this but I didn't see anything. Sometimes there are really weird rules that need one off scenarios, instead of making an IFieldValidationRule, it would be nice to just inline it:

Property(x => x.FirstDate)
.Custom(x =>
{
var lastDate = x.ThirdDate.AddDays(1);
return x.FirstDate > x.SecondDate > x.ThirdDate;
}, StringToken.FromKeyString("First day must be greater then second and at"
+ "least a day after the third."));