Class ValidationFindings
- Namespace
- The.Entities.Validation
- Assembly
- Instagile.dll
Matching and display-policy helpers for edit surfaces distributing validation findings to the fields they own.
public static class ValidationFindings
- Inheritance
-
ValidationFindings
- Inherited Members
Methods
AnchoredTo(IReadOnlyList<ValidationFinding>, IEntity, PropertyInfo)
The findings anchored to the given property of the given entity.
public static List<ValidationFinding> AnchoredTo(IReadOnlyList<ValidationFinding> findings, IEntity entity, PropertyInfo metadata)
Parameters
findingsIReadOnlyList<ValidationFinding>entityIEntitymetadataPropertyInfo
Returns
ShouldDisplay(ValidationSession, ValidationFinding)
The display policy for findings: while the session's root entity is new and a save has not been attempted, nothing shows (the user is still filling in the form). Otherwise a finding shows once validation has been attempted, when its own entity is new (e.g. a freshly added grid row), or once its property has been touched.
public static bool ShouldDisplay(ValidationSession session, ValidationFinding finding)
Parameters
sessionValidationSessionfindingValidationFinding