We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ada4ca6 commit d13324aCopy full SHA for d13324a
index.js
@@ -135,7 +135,7 @@ function formatError(req, h) {
135
}
136
137
function getJoiErrorMessage(details) {
138
- return `Validation error: ${details.message} (${details.path})`;
+ return `Validation error: ${details.message} (${details.path.join('.')})`;
139
140
141
/**
test/index.test.js
@@ -33,7 +33,7 @@ describe('JSON API Plugin', () => {
33
});
34
35
const res = await server.inject({method: 'POST', url: '/test', payload: {fo: {}}});
36
- assert.equal(res.result.errors[0].details, 'Validation error: "bar" is required (fo,bar)');
+ assert.equal(res.result.errors[0].details, 'Validation error: "bar" is required (fo.bar)');
37
38
39
0 commit comments