11<?php
22
3-
43use Kris \LaravelFormBuilder \Fields \RepeatedType ;
54
6-
75class RepeatedTypeTest extends FormBuilderTestCase
86{
97 /** @test */
@@ -55,7 +53,9 @@ public function handles_validation_rules_properly()
5553 $ this ->assertFalse ($ valid );
5654
5755 $ errors = [
58- 'password ' => ['The Password and password confirmation must match. ' ],
56+ 'password ' => [
57+ 'The Password field must match password confirmation. ' ,
58+ ],
5959 ];
6060 $ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
6161
@@ -65,7 +65,7 @@ public function handles_validation_rules_properly()
6565 'rules ' => 'required|min:5 ' ,
6666 ]);
6767 $ plainForm ->renderForm ();
68-
68+
6969 $ rules = ['password ' => ['required ' , 'min:5 ' , 'same:password_confirmation ' ]];
7070 $ this ->assertEquals ($ rules , $ plainForm ->getRules ());
7171
@@ -74,8 +74,8 @@ public function handles_validation_rules_properly()
7474
7575 $ errors = [
7676 'password ' => [
77- 'The Password must be at least 5 characters. ' ,
78- 'The Password and password confirmation must match. ' ,
77+ 'The Password field must be at least 5 characters. ' ,
78+ 'The Password field must match password confirmation . ' ,
7979 ]
8080 ];
8181 $ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
@@ -95,9 +95,9 @@ public function handles_validation_rules_properly()
9595
9696 $ errors = [
9797 'password ' => [
98- 'The Password must be at least 5 characters. ' ,
99- 'The Password and password confirmation must match. ' ,
100- ]
98+ 'The Password field must be at least 5 characters. ' ,
99+ 'The Password field must match password confirmation . ' ,
100+ ]
101101 ];
102102 $ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
103103
@@ -117,9 +117,9 @@ public function handles_validation_rules_properly()
117117
118118 $ errors = [
119119 'password ' => [
120- 'The Password must be at least 5 characters. ' ,
121- 'The Password and password confirmation must match. ' ,
122- ]
120+ 'The Password field must be at least 5 characters. ' ,
121+ 'The Password field must match password confirmation . ' ,
122+ ]
123123 ];
124124 $ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
125125 }
0 commit comments