1
1
<?php
2
2
3
-
4
3
use Kris \LaravelFormBuilder \Fields \RepeatedType ;
5
4
6
-
7
5
class RepeatedTypeTest extends FormBuilderTestCase
8
6
{
9
7
/** @test */
@@ -55,7 +53,9 @@ public function handles_validation_rules_properly()
55
53
$ this ->assertFalse ($ valid );
56
54
57
55
$ errors = [
58
- 'password ' => ['The Password and password confirmation must match. ' ],
56
+ 'password ' => [
57
+ 'The Password field must match password confirmation. ' ,
58
+ ],
59
59
];
60
60
$ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
61
61
@@ -65,7 +65,7 @@ public function handles_validation_rules_properly()
65
65
'rules ' => 'required|min:5 ' ,
66
66
]);
67
67
$ plainForm ->renderForm ();
68
-
68
+
69
69
$ rules = ['password ' => ['required ' , 'min:5 ' , 'same:password_confirmation ' ]];
70
70
$ this ->assertEquals ($ rules , $ plainForm ->getRules ());
71
71
@@ -74,8 +74,8 @@ public function handles_validation_rules_properly()
74
74
75
75
$ errors = [
76
76
'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 . ' ,
79
79
]
80
80
];
81
81
$ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
@@ -95,9 +95,9 @@ public function handles_validation_rules_properly()
95
95
96
96
$ errors = [
97
97
'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
+ ]
101
101
];
102
102
$ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
103
103
@@ -117,9 +117,9 @@ public function handles_validation_rules_properly()
117
117
118
118
$ errors = [
119
119
'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
+ ]
123
123
];
124
124
$ this ->assertEquals ($ errors , $ plainForm ->getErrors ());
125
125
}
0 commit comments