Skip to content

Commit ad212e3

Browse files
authored
Merge pull request #317 from aledalgrande/aledalgrande-patch-1
Fix error message for .many
2 parents 4536e75 + 27a7535 commit ad212e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ourJoi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Joi.one = function () {
2727
Joi.many = function () {
2828
const resources = Array.prototype.slice.call(arguments)
2929
resources.forEach(resource => {
30-
if (typeof resource !== 'string') throw new Error('Expected a string when defining a primary relation via .one()')
30+
if (typeof resource !== 'string') throw new Error('Expected a string when defining a primary relation via .many()')
3131
})
3232
const obj = Joi.array().items(resources.map(ourJoi._joiBase))
3333
obj._settings = {

0 commit comments

Comments
 (0)