@inheritdoc

@param ValidationResult $validationResult
181606
public function validate(ValidationResult $validationResult)
    {
        $validator = new SynonymValidator(array(
            'SearchSynonyms',
        ));

        $validator->php(array(
            'SearchSynonyms' => $this->owner->SearchSynonyms
        ));

        $errors = $validator->getErrors();

        if (is_array($errors) || $errors instanceof Traversable) {
            foreach ($errors as $error) {
                $validationResult->addError($error['message']);
            }
        }
    }
850270
public function validate($value) {
        $dateTime = \DateTime::createFromFormat($this->format, $value);
        if(!$dateTime instanceof \DateTime || $dateTime->format($this->format)!=$value) {
            return new ValidationResult(false, 'Invalid date');
        }

        return new ValidationResult(true);
    }
926593
public function validateValidatorConfiguration($validatorConfiguration)
    {
        $validationErrors = array();

        foreach ($validatorConfiguration as $validatorIdentifier => $constraints) {
            if ($validatorIdentifier !== 'FloatValueValidator') {
                $validationErrors[] = new ValidationError(
                    "Validator '%validator%' is unknown",
                    null,
                    array(
                        '%validator%' => $validatorIdentifier,
                    ),
                    "[$validatorIdentifier]"
                );

                continue;
            }

            foreach ($constraints as $name => $value) {
                switch ($name) {
                    case 'minFloatValue':
                    case 'maxFloatValue':
                        if ($value !== null && !is_numeric($value)) {
                            $validationErrors[] = new ValidationError(
                                "Validator parameter '%parameter%' value must be of numeric type",
                                null,
                                array(
                                    '%parameter%' => $name,
                                ),
                                "[$validatorIdentifier][$name]"
                            );
                        }
                        break;
                    default:
                        $validationErrors[] = new ValidationError(
                            "Validator parameter '%parameter%' is unknown",
                            null,
                            array(
                                '%parameter%' => $name,
                            ),
                            "[$validatorIdentifier][$name]"
                        );
                }
            }
        }

        return $validationErrors;
    }
189306
public function validate() {
		parent::validate();

		if ($this->getName() === null) {
			throw new ValidationException("'name' can't be null", 'name', $this);
		}
		if ($this->getType() === null) {
			throw new ValidationException("'type' can't be null", 'type', $this);
		}
	}
85314
public function validate($value)
    {
        // if value required, then only valueTrue is allowed
        if ($this->required && $value !== $this->valueTrue) {
            throw new ValidationException([$this->name => 'Must be selected']);
        }
    }
946025
protected function validateCommon($value, $validateResult)
    {
        //While current status of validation is true,
        //keep validating against common keywords

        //validate against enum using validateEnum
        if ($validateResult->status === true && $this->enum) {
            $validateResult = $this->validateEnum($value, $validateResult->value);

            if ($validateResult->status !== true) {
                //failed to validate against enum
                return $validateResult;
            }
        }

        //validate against not
        if ($validateResult->status === true && $this->not) {
            $validateResult = $this->validateNot($value, $validateResult->value);

            if ($validateResult->status !== true) {
                //failed to validate against not
                return $validateResult;
            }
        }

        return $this->runValidateCallback($validateResult);
    }
1358814
public function addValidation($validation, $value = null)
    {
        if (false === isset($this->validation[$validation])) {
            $this->validation[$validation] = [];
        }

        $this->validation[$validation][] = $value;

        return $this;
    }
655815
public function setValidations(ArrayObject $validations) {
        foreach ($validations as $param => $validation) {
            $this->setValidation($param, $validation);
        }
        return $this;
    }
818618
public function setInvalidMessage(string $invalidMessage = null, array $invalidMessageParameters = []): void
    {
        $this->invalidMessage = $invalidMessage;
        $this->invalidMessageParameters = $invalidMessageParameters;
    }
85546
public function validate() {
		parent::validate();

		if ($this->getEntity() === null) {
			throw new ValidationException("'entity' can't be null", 'entity', $this);
		}
		if ($this->getEntityStates() === null) {
			throw new ValidationException("'entityStates' can't be null", 'entityStates', $this);
		}
		if ($this->getUrl() === null) {
			throw new ValidationException("'url' can't be null", 'url', $this);
		}
	}
646630
protected function runQueuedExtend(Validator $validationResolver)
    {
        if (!is_null($method = $this->validationScenarios['extend'])) {
            call_user_func([$this, $method], $validationResolver);
        }
    }
1270294
protected function validateValue($value, EiFieldValidationResult $validationResult) {
		if ($value != null) {
			CastUtils::assertTrue($value instanceof EiuFieldMap);
			
			$eiEntryValidationResult = new EiEntryValidationResult();
			$validationResult->addSubEiEntryValidationResult($eiEntryValidationResult);
			$value->validate($eiEntryValidationResult);
			return;
		}
		
		if ($this->eiProp->isMandatory()) {
			$validationResult->addError(Message::createCodeArg('common_field_required_err', 
					['field' => $this->eiProp->getLabelLstr()->t($this->eiu->getN2nLocale())], null, 'rocket'));
		}
	}
601639
public function setValidationError($attributeName, $validationName, $errorMessage)
    {
        $this->validationErrors = Hash::merge($this->getValidationErrors(), array(
            $attributeName => array(
                $validationName => $errorMessage
            )
        ));
    }
949913
protected function handleResult(ContextInterface $context, $result)
    {
        $validated = $this->validateResult($result);
        if (is_null($validated)) {
            $validated = $result;
        }

        if ($validated instanceof ContextInterface) {
            $context = $validated;
        } elseif (!is_null($validated)) {
            $context->setResult($validated);
        }

        return $context;
    }
1154051
public function validate() {

		if ($this->getExternalId() === null) {
			throw new ValidationException("'externalId' can't be null", 'externalId', $this);
		}
		if ($this->getLineItems() === null) {
			throw new ValidationException("'lineItems' can't be null", 'lineItems', $this);
		}
	}
192421
public function validate(EiField $eiField, EiFieldValidationResult $validationResult) {
		return $this->validatable->validateEiFieldValue($this->eiu, $eiField->getValue(), $validationResult);
	}
874676
public function onValidate(ValidationEvent $event)
    {
        try {
            $this->validator->validate(
                $event->getType(),
                $event->getFile(),
                'upload_validators'
            );
        } catch (JbFileUploaderValidationException $e) {
            throw new ValidationException($e->getMessage(), null, $e);
        }
    }