Thank you for writing this, I find your library to be super helpful!
ISSUE
Upon execution of your example, I get the following error:
ReferenceError: Schema is not defined
I was not able to locate your definition/import of Schema in your code.
CODE
// custom validation function checking value for a regex
const checkHexColor = val => {
return /^#[0-9a-fA-F]$/.test(val)
}
const car = new Schema({
color: {
type: String,
use: { checkHexColor }
}
})
This seems to be a pure documentation issue. Just passing a base JS object instead of trying to instantiate a Schema instance works with validateSchema 🙂
Thank you for writing this, I find your library to be super helpful!
ISSUE Upon execution of your example, I get the following error:
CODE