formatValidationMessage()
formatValidationMessage(
message,options?):string
Defined in: validator/src/format.ts:78
Format a single validation message for display.
Parameters
message
Validation message to format
options?
Formatting options
Returns
string
Formatted string
Example
const message = { ruleId: 'PS001', ruleName: 'required-meta-id', severity: 'error', message: 'Missing required @meta.id field', location: { file: 'project.prs', line: 1, column: 1 }};
formatValidationMessage(message)// 'project.prs:1:1 - error: Missing required @meta.id field'
formatValidationMessage(message, { includeRuleId: true })// 'project.prs:1:1 - error [PS001]: Missing required @meta.id field'