Add flags for incorrect array keys
tburry opened this issue · 0 comments
tburry commented
Right now, arrays are valid if they contain the zero key. If it is out of order or there are missing/invalid other keys then the schema will clean the output, but that may not be the desired result. Similar to the extra property flags we should add the following flags to the Schema class:
/**
* Trigger a notice when an array has invalid keys.
*/
const VALIDATE_ARRAY_KEY_NOTICE = 0x4;
/**
* Throw a ValidationException an array has invalid keys.
*/
const VALIDATE_ARRAY_KEY_EXCEPTION = 0x8;