This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Description
I have a constraint looking like this:
'copy.primaryColor':
format:
pattern: "^#(?:[0-9a-f]{3}){1,2}$"
flags: "i"
message: "must be a valid hex color"
The problem is that everything breaks if copy is null.
TypeError: Cannot use 'in' operator to search for 'primaryColor' in null
at Function.v.extend.getDeepObjectValue (/Users/javve/Git/confetti/confetti-api/node_modules/validate.js/validate.js:310:18)
at Function.v.extend.runValidations (/Users/javve/Git/confetti/confetti-api/node_modules/validate.js/validate.js:66:19)
at Function.v.extend.async (/Users/javve/Git/confetti/confetti-api/node_modules/validate.js/validate.js:129:23)