Skip to content

How to delete the text behind each validation error msg? #1713

Answered by msujew
durianwaffle asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @durianwaffle,

you can override the DocumentValidator#getSource method to return an empty string to remove/change the text:

protected toDiagnostic<N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N, string>): Diagnostic {
return {
message,
range: getDiagnosticRange(info),
severity: toDiagnosticSeverity(severity),
code: info.code,
codeDescription: info.codeDescription,
tags: info.tags,
relatedInformation: info.relatedInformation,
data: info.data,
source: this.getSource()
};
}
pro…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@durianwaffle
Comment options

Answer selected by durianwaffle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants