jqh 5 years ago
parent
commit
ae386008f7

+ 1 - 1
resources/lang/en/admin.php

@@ -185,7 +185,7 @@ return [
     'import_extension_confirm' => 'Are you sure import the extension?',
     'selected_must_less_then'  => 'Only supports maximum :num options.',
     'validation' => [
-        'match'     => 'Does not match with :attribute.',
+        'match'     => 'The :attribute and :other must match.',
         'minlength' => 'The :attribute must be at least :min characters.',
         'maxlength' => 'The :attribute may not be greater than :max characters.',
     ],

+ 1 - 1
src/Controllers/AuthController.php

@@ -178,7 +178,7 @@ class AuthController extends Controller
                 }
                 return $v;
             });
-        $form->password('password_confirmation', trans('admin.password_confirmation'))->confirm('password');
+        $form->password('password_confirmation', trans('admin.password_confirmation'))->same('password');
 
         $form->setAction(admin_url('auth/setting'));
 

+ 1 - 1
src/Controllers/UserController.php

@@ -258,7 +258,7 @@ class UserController extends Controller
                     ->maxLength(20);
             }
 
-            $form->password('password_confirmation', trans('admin.password_confirmation'))->confirm('password');
+            $form->password('password_confirmation', trans('admin.password_confirmation'))->same('password');
 
             $form->ignore(['password_confirmation']);
 

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

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