Class ValidationRequirement
The validation sequence a gated command runs before acting: a full validation under the command's intent, display of entity-level findings as notifications, and a block when the report reaches the command's gate level. Save-like commands gate at Error; Confirm/Submit-like commands typically gate at Warning, blocking on findings which never prevent a plain save.
public static class ValidationRequirement
- Inheritance
-
ValidationRequirement
- Inherited Members
Methods
CheckAsync(ISurface, string, ValidationSession?, ValidationIntent?, MessageLevel)
Runs the session's full validation under intent (which the session then keeps for live
re-validation; passing null gates at Save without re-intenting the session) and marks it attempted, so every
finding displays on its field or row. The command blocks on its own intent's report, so an intent adopted by
an earlier blocked command never blocks this one. Entity-level findings are shown as notifications. Returns
true when the command may proceed; when blocked, a summary notification carries the report as its detail.
A screen without a session always proceeds.
public static Task<bool> CheckAsync(ISurface surface, string commandName, ValidationSession? session, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
surfaceISurfacecommandNamestringsessionValidationSessionintentValidationIntent?blockAtMessageLevel