jqh 5 vuotta sitten
vanhempi
commit
712eafb53f
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      src/Form/Field/Text.php

+ 5 - 1
src/Form/Field/Text.php

@@ -69,7 +69,11 @@ class Text extends Field
 
         $attributes = [
             'data-match'       => '#'.$field->getElementId(),
-            'data-match-error' => str_replace([':attribute', ':other'], [$this->label, $name], $error ?: trans('admin.validation.match')),
+            'data-match-error' => str_replace(
+                [':attribute', ':other'],
+                [$field->label(), $this->label()],
+                $error ?: trans('admin.validation.match')
+            ),
         ];
 
         return $this->attribute($attributes);