Skip to content

Commit e97c04a

Browse files
authored
fix get validator when form not exists in element
1 parent 5eeb268 commit e97c04a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Form/Element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function getValidators()
181181

182182
public function validate($keys)
183183
{
184-
$validator = $this->form ? $this->form->getValidator() : validator();
184+
$validator = $this->form ? $this->form->getValidator() : validator()->make([], []);
185185
$values = request($keys);
186186

187187
$validator = $validator->setData($values);

0 commit comments

Comments
 (0)