Skip to content

Commit 72e9aa9

Browse files
chore(validation): improve custom validation attribute to pass member when failing (#209)
1 parent cd2280c commit 72e9aa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common-features/input-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ There is no built-in provision in the framework for validating a field value bas
497497
var currentValue = (DateTime?)value;
498498
var compareToValue = (DateTime?)propertyInfo?.GetValue(validationObject);
499499
500-
return currentValue < compareToValue ? ValidationResult.Success : new ValidationResult(ErrorMessage);
500+
return currentValue < compareToValue ? ValidationResult.Success : new ValidationResult(ErrorMessage, new[] { validationContext.MemberName });
501501
}
502502
}
503503

0 commit comments

Comments
 (0)