/** * We hook into the validateType method, this * gets called form the normalize method. * * @param mixed $value * * @throws InvalidTypeException */ protected function validateType($value) { if (isset($value['type'])) { $this->prepareChildren($value['type']); } else { // ignore extra keys so the error message will be // focused on the missing type field $this->setIgnoreExtraKeys(true); } parent::validateType($value); }