File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Illuminate/Validation Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,15 @@ protected static function summarize($validator)
88
88
$ messages = $ validator ->errors ()->all ();
89
89
90
90
if (! count ($ messages ) || ! is_string ($ messages [0 ])) {
91
- return 'The given data was invalid. ' ;
91
+ return $ validator -> getTranslator ()-> get ( 'The given data was invalid. ' ) ;
92
92
}
93
93
94
94
$ message = array_shift ($ messages );
95
95
96
- if ($ additional = count ($ messages )) {
97
- $ pluralized = $ additional === 1 ? 'error ' : 'errors ' ;
96
+ if ($ count = count ($ messages )) {
97
+ $ pluralized = $ count === 1 ? 'error ' : 'errors ' ;
98
98
99
- $ message .= " ( and { $ additional } more { $ pluralized} ) " ;
99
+ $ message .= ' ' . $ validator -> getTranslator ()-> get ( " ( and :count more $ pluralized) " , compact ( ' count ' )) ;
100
100
}
101
101
102
102
return $ message ;
You can’t perform that action at this time.
0 commit comments