Browse Source

Merge pull request #1306 from luzat/classvalidation-master

Support for class-level validation
Thomas 12 năm trước cách đây
mục cha
commit
5f47aff854
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Validator/ErrorElement.php

+ 4 - 0
Validator/ErrorElement.php

@@ -147,6 +147,10 @@ class ErrorElement
      */
     protected function getValue()
     {
+        if ($this->current == '') {
+            return $this->subject;
+        }
+
         $propertyAccessor = PropertyAccess::getPropertyAccessor();
         return $propertyAccessor->getValue($this->subject, $this->getCurrentPropertyPath());
     }