getProperties(); foreach ($properties as $property) { $attributes = $property->getAttributes(); $propertyName = $property->getName(); $propertyValue = $property->getValue($target); if(sizeof($attributes) == 0) continue; foreach ($attributes as $attribute) { if($attribute->getName() == "$nameBase\\QueryBuilderRequiredField") { if($propertyValue == "") throw new \Exception(); } } } } }