Open bharley opened 8 years ago
If you're validating properties of an object inside of the object being validated, they don't come through to the final validation object even though they're being validated:
const checkit = new Checkit({ title: 'required', 'name.first': 'required', 'name.last': 'required', age: ['required', 'numeric'] }); checkit.runSync({ title: 'Janitor', name: {first: 'John'}, age: 32 }); // [ { Error message: '1 invalid values', errors: { 'name.last': [Object] } }, null ] checkit.runSync({ title: 'Janitor', name: {first: 'John', last: 'Doe'}, age: 32 }); // [ null, { title: 'Janitor', age: 32 } ]
Given that the name property is being validated, I would expect that it would be part of the output too.
name
If you're validating properties of an object inside of the object being validated, they don't come through to the final validation object even though they're being validated:
Given that the
name
property is being validated, I would expect that it would be part of the output too.