ajv-validator / ajv-validator/ajv-errors

Use params in custom errors

オープン
#17 コメント 9 件 リアクション 12 件 担当者 0 名 GitHub で見る
feature
主要言語
TypeScript
スター
289
フォーク
21
PR マージ指標
30日以内にマージされた PR はありません

説明

Hey :) First of all, thank you for this amazing library.
I was wondering if it is possible to use params in custom errors templates ?
For example, I'd like to be able to do something like this:

errorMessage: {
additionalProperties: 'Invalid additional property "${params.additionalProperty}"'
}

To get an error message with the property that failed.
Is there anyway to do it or do we have to post-process the error ?
Thanks !

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。