Closed
Description
Context
- node version: v8.9.2
- joi version: 13.4.0
- environment (node, browser): node
- used with (hapi, standalone, ...): standalone
What are you trying to achieve or the steps to reproduce ?
Joi validate function fails on UUID v3, when UUID version passed to function.
For reproduction, please, follow the next script:
const joi = require("joi")
const uuid = "bfbf15ac-7388-3cf3-6720-19fde31a1711";
joi.validate(uuid, joi.string().guid()) // passes
joi.validate(uuid, joi.string().guid({version: ["uuidv1", "uuidv2", "uuidv3", "uuidv4", "uuidv5"]})) // fails
What did you expect ?
Expected behaviour, that validate function with version will not fail.