mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-03 20:04:48 +02:00
⚡ Improved validation warnings in JSON editor
This commit is contained in:
parent
ad1fae5b66
commit
e472d91102
@ -193,12 +193,13 @@ export default {
|
|||||||
validationErrors(errors) {
|
validationErrors(errors) {
|
||||||
const errorMessages = [];
|
const errorMessages = [];
|
||||||
errors.forEach((error) => {
|
errors.forEach((error) => {
|
||||||
|
console.log(error);
|
||||||
switch (error.type) {
|
switch (error.type) {
|
||||||
case 'validation':
|
case 'validation':
|
||||||
errorMessages.push({
|
errorMessages.push({
|
||||||
type: 'validation',
|
type: 'validation',
|
||||||
msg: `${this.$t('config-editor.warning-msg-validation')}: `
|
msg: `${this.$t('config-editor.warning-msg-validation')}: `
|
||||||
+ `${error.error.keyword} ${error.error.message}`,
|
+ `${(error.error || error).dataPath} ${(error.error || error).message}`,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'error':
|
case 'error':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user