Skip to content

Commit

Permalink
🐛 fixed request error
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Jan 23, 2022
1 parent a280776 commit 8036ebe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static function validate(array $rules, array $messages = []): bool
$fields = [];

foreach ($rules as $param => $rule) {
$fields[] = ['name' => $param, 'value' => Request::get($param), 'rule' => $rule];
$fields[] = ['name' => $param, 'value' => (new Request)->get($param), 'rule' => $rule];
}

foreach ($fields as $field) {
Expand Down Expand Up @@ -286,7 +286,7 @@ public static function isEmail($value): bool
*/
public static function body()
{
return Request::body();
return (new Request)->body();
}

/**
Expand All @@ -296,7 +296,7 @@ public static function body()
*/
public static function get()
{
return Request::body();
return (new Request)->body();
}

/**
Expand Down

0 comments on commit 8036ebe

Please sign in to comment.