To validate before accessor brakes with not found field

@param object $object    To be parsed
@param string $fieldName Field name, dot chained.
@return bool
343898
private function propertyExists($object, $fieldName)
    {
        if (property_exists($object, $fieldName)) {
            return true;
        }

        foreach (explode('.', $fieldName) as $field) {
            if (property_exists($object, $field)) {
                $object = $object->{$field};
                if (!is_object($object)) {
                    break;
                }
                continue;
            } else {
                return false;
            }
        }
        return true;
    }
494408
public function validateAttribute($object, $attribute)
    {
        //decrement the columnCount by 1 as we are starting with 0
        $this->columnCount--;

        $file = $object->$attribute;
        if(!$file instanceof CUploadedFile) {
            $file = CUploadedFile::getInstance($object, $attribute);
            if(null===$file)
                return $this->emptyAttribute($object, $attribute);
        }

        $this->validateCSVHeaders($object, $attribute, $file);
    	$this->validateCSVRows($object, $attribute, $file);
    }
1265620
protected function isValid($object)
    {
        if (!is_object($object)) {
            $this->addError('Object expected, %1$s given.', 1241099149, [gettype($object)]);
            return;
        } elseif ($this->isValidatedAlready($object) === true) {
            return;
        }
        foreach ($this->propertyValidators as $propertyName => $validators) {
            $propertyValue = $this->getPropertyValue($object, $propertyName);
            $result = $this->checkProperty($propertyValue, $validators);
            if ($result !== null) {
                $this->result->forProperty($propertyName)->merge($result);
            }
        }
    }
472010
public function checkInstanceOfRestriction($object) : bool
    {
        return empty($this->instanceOf)|| $object instanceOf $this->instanceOf;
    }
928352
public static function validateObject($object)
    {
        $pattern = '/^.{1,1023}$/';
        if (empty($object) || !preg_match($pattern, $object) ||
            self::startsWith($object, '/') || self::startsWith($object, '\\')
        ) {
            return false;
        }
        return true;
    }
1189216
protected function validateObject($object)
    {
        $classSchema = $this->reflectionService->getClassSchema($object);
        $validator = $this->validatorResolver->getBaseValidatorConjunction($classSchema->getClassName());
        if ($validator === null) {
            return;
        }
        $validationResult = $validator->validate($object);
        if ($validationResult->hasErrors()) {
            $errorMessages = '';
            $allErrors = $validationResult->getFlattenedErrors();
            foreach ($allErrors as $path => $errors) {
                $errorMessages .= $path . ':' . PHP_EOL;
                foreach ($errors as $error) {
                    $errorMessages .= (string)$error . PHP_EOL;
                }
            }
            throw new ObjectValidationFailedException('An instance of "' . get_class($object) . '" failed to pass validation with ' . count($errors) . ' error(s): ' . PHP_EOL . $errorMessages, 1322585162);
        }
    }
1183697
static function checkProperty($object, $key, $value, \Zend_Validate_Interface $validator) {
		if (!self::validate($value, $validator)) {
			df_error(new \Df\Core\Exception\InvalidObjectProperty($object, $key, $value, $validator));
		}
	}
796060
protected function validateAttribute($object,$attribute)
	{
		$value=$object->$attribute;
		if($this->allowEmpty && $this->isEmpty($value))
			return;

		$valid=false;

		// reason of array checking is explained here: https://github.com/yiisoft/yii/issues/1955
		if(!is_array($value))
		{
			$formats=is_string($this->format) ? array($this->format) : $this->format;
			foreach($formats as $format)
			{
				$timestamp=CDateTimeParser::parse($value,$format,array('month'=>1,'day'=>1,'hour'=>0,'minute'=>0,'second'=>0));
				if($timestamp!==false)
				{
					$valid=true;
					if($this->timestampAttribute!==null)
						$object->{$this->timestampAttribute}=$timestamp;
					break;
				}
			}
		}

		if(!$valid)
		{
			$message=$this->message!==null?$this->message : Yii::t('yii','The format of {attribute} is invalid.');
			$this->addError($object,$attribute,$message);
		}
	}
916378
function isPropertySet ($fieldName)
  {
    return isset($this->props->$fieldName)
      ? $this->props->$fieldName !== ''
      : $this->isBound ($fieldName);
  }
1071504
public function fieldHasError($fieldName)
    {
        foreach ($this->errors as $error) {
            if ($error->getParam() == $fieldName) {
                return true;
            }
        }

        if (!$this->isSubmitted()) {
            return false;
        }

        if (isset($this->validator) && $this->validator->fieldHasError($fieldName)) {
            return true;
        }
    }
1009892
public static function validate_object($object) {
		$pattern = '/^\//';
		if (empty ( $object ) || ! preg_match ( $pattern, $object )) {
			return false;
		}
		return true;
	}
406668
public static function reset($object)
	{
		if (!($object instanceof FieldOptions)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\FieldOptions.');
		}
		$object->ctype = NULL;
		$object->packed = NULL;
		$object->jstype = NULL;
		$object->lazy = NULL;
		$object->deprecated = NULL;
		$object->weak = NULL;
		$object->uninterpretedOption = NULL;
	}
259313
protected function parse($object)
    {
        if (! is_object($object)) {
            throw new ValidationException(
                'Error has to be an object, "' . gettype($object) . '" given.'
            );
        }

        if (property_exists($object, 'id')) {
            if (! is_string($object->id)) {
                throw new ValidationException(
                    'property "id" has to be a string, "' .
                    gettype($object->id) . '" given.'
                );
            }

            $this->set('id', strval($object->id));
        }

        if (property_exists($object, 'links')) {
            $this->set('links', $this->create('ErrorLink', $object->links));
        }

        if (property_exists($object, 'status')) {
            if (! is_string($object->status)) {
                throw new ValidationException(
                    'property "status" has to be a string, "' .
                    gettype($object->status) . '" given.'
                );
            }

            $this->set('status', strval($object->status));
        }

        if (property_exists($object, 'code')) {
            if (! is_string($object->code)) {
                throw new ValidationException(
                    'property "code" has to be a string, "' .
                    gettype($object->code) . '" given.'
                );
            }

            $this->set('code', strval($object->code));
        }

        if (property_exists($object, 'title')) {
            if (! is_string($object->title)) {
                throw new ValidationException(
                    'property "title" has to be a string, "' .
                    gettype($object->title) . '" given.'
                );
            }

            $this->set('title', strval($object->title));
        }

        if (property_exists($object, 'detail')) {
            if (! is_string($object->detail)) {
                throw new ValidationException(
                    'property "detail" has to be a string, "' .
                    gettype($object->detail) . '" given.'
                );
            }

            $this->set('detail', strval($object->detail));
        }

        if (property_exists($object, 'source')) {
            $this->set('source', $this->create('ErrorSource', $object->source));
        }

        if (property_exists($object, 'meta')) {
            $this->set('meta', $this->create('Meta', $object->meta));
        }
    }
444878
protected function checkRules($object)
    {
        $this->assertTrue(property_exists($object, 'rules'));

        $this->assertInternalType('array', $object->rules);

        foreach ($object->rules as $rule) {
            $this->checkRule($rule);
        }
    }
776316
protected function validateEmpty($object, $attribute)
    {
        if (!$this->allowEmpty) {
            $this->addError($object, $attribute, $this->emptyMessage);
        }
    }
565729
public function hasCallbackObject($object, $callback = null)
    {
        return isset($this->callbacks[$object]) && ($callback === null || $this->callbacks[$object] === $callback);
    }
30778
public static function getObjectFieldValue($object, $field)
    {
        $op = $value = null;

        $pos = strpos($field, '(');
        if (false !== $pos) {
            list ($op, $field) = explode('(', $field, 2);
            $field = rtrim($field, ')');
        }

        if (isset($object[$field])) {
            $value = $object[$field];
        } else {
            $accessors = array('', 'get', 'is');

            foreach ($accessors as $accessor) {
                $accessor .= $field;

                if (!method_exists($object, $accessor)) {
                    continue;
                }

                $value = $object->{$accessor}();
                break;
            }
        }

        if ($op) {
            $function = 'filter' . ucfirst(strtolower($op));
            if (method_exists(static::class, $function)) {
                $value = static::$function($value);
            }
        }

        return $value;
    }