/** * @return ValidationContainer */ protected function createValidationContainer() { $recordValidationContainer = new ValidationContainer(); $fieldTypeValidator = $this->createConfiguredFieldTypeValidator(); $recordValidationContainer->addValidator(ValidationContainer::VALIDATOR_FIELD, $fieldTypeValidator); $recordValidationContainer->addValidator(ValidationContainer::VALIDATOR_UNIQUE_CONSTRAINT, new UniqueRecordValidator()); return $recordValidationContainer; }
/** * @param string $name * @param RecordValidator $validator */ private function addValidatorToContainer($name, RecordValidator $validator) { $this->container->addValidator($name, $validator); }