Skip to content

Commit

Permalink
any() method added
Browse files Browse the repository at this point in the history
  • Loading branch information
tamedevelopers committed Oct 13, 2024
1 parent 8b9c4a4 commit 41a534f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* [POST](#post)
* [GET](#get)
* [ALL](#all)
* [ANY](#any)
* [Rules](#rules)
* [Validate](#validate)
* [Save](#save)
Expand Down Expand Up @@ -207,6 +208,15 @@ $form->all()->rules([
])
```

### Any
- same as `all`

```
$form->any()->rules([
//
])
```

### Rules
- By default only `DATA TYPE` and `[INPUT_NAME]` is required
- Always seperate each indicator with a 'colon' `:` or 'pipe' `|`
Expand Down
10 changes: 10 additions & 0 deletions src/Traits/ValidatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ public function all()
return $this;
}

/**
* Convert Form Request to REQUEST_METHOD
*
* @return $this
*/
public function any()
{
return $this->all();
}

/**
* Convert data to array
* @param mixed $data
Expand Down

0 comments on commit 41a534f

Please sign in to comment.