Created
August 28, 2021 19:56
-
-
Save buildmotion/d91e22c9155c38f301a7d2fbbdf6b9c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load the error/rule violations into the ServiceContext so that the information bubbles up to the caller of the service; | |
this.validationContext.results.forEach( (e) => { | |
if(!e.isValid && e.rulePolicy.isDisplayable) { | |
let serviceMessage = new ServiceMessage(e.rulePolicy.name, e.rulePolicy.message, MessageType.Error); | |
this.serviceContext.addMessage(serviceMessage); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment