We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 119e056 + a3257f2 commit ab30b5dCopy full SHA for ab30b5d
src/Form/Element/File.php
@@ -36,4 +36,29 @@ public function view()
36
]);
37
}
38
39
+ public function validate($keys)
40
+ {
41
+ if (!$this->isMultiple)
42
43
+ return parent::validate($keys);
44
+ }
45
+
46
+ $values = request($keys);
47
+ $validator = validator($values, [
48
+ $this->name . '.*' => $this->validators
49
+ ]);
50
51
+ if ($validator->fails())
52
53
+ $errors = $validator->errors()
54
+ ->toArray();
55
56
+ $this->error = array_first($errors);
57
58
+ return false;
59
60
61
+ return true;
62
63
64
0 commit comments