Skip to content

Commit 41a534f

Browse files
any() method added
1 parent 8b9c4a4 commit 41a534f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* [POST](#post)
2323
* [GET](#get)
2424
* [ALL](#all)
25+
* [ANY](#any)
2526
* [Rules](#rules)
2627
* [Validate](#validate)
2728
* [Save](#save)
@@ -207,6 +208,15 @@ $form->all()->rules([
207208
])
208209
```
209210

211+
### Any
212+
- same as `all`
213+
214+
```
215+
$form->any()->rules([
216+
//
217+
])
218+
```
219+
210220
### Rules
211221
- By default only `DATA TYPE` and `[INPUT_NAME]` is required
212222
- Always seperate each indicator with a 'colon' `:` or 'pipe' `|`

src/Traits/ValidatorTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ public function all()
192192
return $this;
193193
}
194194

195+
/**
196+
* Convert Form Request to REQUEST_METHOD
197+
*
198+
* @return $this
199+
*/
200+
public function any()
201+
{
202+
return $this->all();
203+
}
204+
195205
/**
196206
* Convert data to array
197207
* @param mixed $data

0 commit comments

Comments
 (0)