ValidationResult¶
Serializable, mutable implementation of IValidationResult that aggregates validation failures and free-text messages and derives its IsValid flag from whether any failures are present.
Purpose¶
- Serializable, mutable implementation of
IValidationResultthat aggregates validation failures and free-text messages and derives itsIsValidflag from whether any failures are present.
Context¶
- Namespace:
SAIF.Common - Assembly/package:
SAIF.Framework.Common
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| Errors | public IList<ValidationFailure> Errors { get; } |
The collected list of field-level validation failures. (BR-046) |
| Messages | public IList<string> Messages { get; } |
Free-text, non-field-specific validation messages. |
| IsValid | public virtual bool IsValid { get; } |
True only when Errors is empty; overridable by subclasses that add extra validity rules. (BR-047) |
| ValidationResult() | public ValidationResult() |
Constructs an empty, initially-valid result. |
| ValidationResult(IEnumerable |
public ValidationResult(IEnumerable<ValidationFailure> failures) |
Constructs a result pre-populated with the given failures. |
Sources¶
Common/SAIF.Common/Classes/ValidationResult.cs