In some cases, validation of one field depends on another field in a non-static way.
E.g.
$updated must be greater than or equal to $created.
We should be able to introduce this to the framework without having to change the entire framework if we choose a syntax as:
When("$updated", Is.Defined()).Then(Field("$updated", ComparedTo("$created", b => Must.Be.GreaterOrEqualTo((DateTime)b))));
//Alternate syntax: (CompareTo over ComparedTo).
When("$updated", Is.Defined()).Then(Field("$updated", CompareTo("$created", ...
One issue here is the descriptors, they need to be able to describe the lazy constraint.
In some cases, validation of one field depends on another field in a non-static way.
E.g.
$updated must be greater than or equal to $created.
We should be able to introduce this to the framework without having to change the entire framework if we choose a syntax as:
One issue here is the descriptors, they need to be able to describe the lazy constraint.