Skip to content

Commit f736f34

Browse files
fix: call getRules() instead of using $this->rules directly
Changing this also adds support for the `UserValidator` which defines `getRules()` itself
1 parent 957cf0d commit f736f34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

framework/core/src/Foundation/AbstractValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function getAttributeNames()
107107
$extId = $this->getClassExtensionId();
108108
$attributeNames = [];
109109

110-
foreach (array_keys($this->rules) as $attribute) {
110+
foreach (array_keys($this->getRules()) as $attribute) {
111111
$key = $extId ? "$extId.validation.attributes.$attribute" : "validation.attributes.$attribute";
112112
$attributeNames[$attribute] = $this->translator->trans($key);
113113
}

0 commit comments

Comments
 (0)