Neos\Flow\Validation\Validator\NotEmptyValidator::isValid PHP Method

isValid() protected method

Checks if the given value is not empty (NULL, empty string, empty array or empty object that implements the Countable interface).
protected isValid ( mixed $value ) : void
$value mixed The value that should be validated
return void
    protected function isValid($value)
    {
        if ($value === null) {
            $this->addError('This property is required.', 1221560910);
        }
        if ($value === '') {
            $this->addError('This property is required.', 1221560718);
        }
        if (is_array($value) && empty($value)) {
            $this->addError('This property is required', 1354192543);
        }
        if (is_object($value) && $value instanceof \Countable && $value->count() === 0) {
            $this->addError('This property is required.', 1354192552);
        }
    }
NotEmptyValidator