|
Hi ajhops, I'd suggest enabling this validation for property updates only (i.e. disable it during Instance validation). By default a verifier ExecutionMode is set to VerifierExecutionModes.InstanceAndOnBeforeSetTriggers. i.e. during instance validation and when the property is updated (OnBeforeSetTriggers). You could disable it by set the ExecutionMode to VerifierExecutionModes.OnBeforeSetTriggers: public static Verifier GetFutureDateVerifier(Type type, string propertyName, bool isRequired) { var v = new DateTimeRangeVerifier(type, propertyName, isRequired, DateTime.Today.Date, DateTime.MaxValue); v.VerifierArgs.ErrorMessageInfo.ErrorMessage = "Must be on or after today."; v.VerifierOptions.ExecutionModes = VerifierExecutionModes.OnAfterSetTriggers; return v; } Note the if this property is required, you might want a RequiredValueVerifier to execute on instance validation. You can find more information about configuring verifiers in the http://drc.ideablade.com/xwiki/bin/view/Documentation/validation-configure - DevForce Resource Center . Regards, Silvio.
|