|
19 | 19 | * [Csrf Token](#csrf-token) |
20 | 20 | * [Usage](#usage) |
21 | 21 | * [Error Type](#error-type) |
| 22 | + * [Token](#token) |
22 | 23 | * [POST](#post) |
23 | 24 | * [GET](#get) |
24 | 25 | * [ALL](#all) |
@@ -59,7 +60,7 @@ Prior to installing `ultimate-uploader` get the [Composer](https://getcomposer.o |
59 | 60 | **Step 1** — update your `composer.json`: |
60 | 61 | ```composer.json |
61 | 62 | "require": { |
62 | | - "peterson/php-form-validator": "^3.3.1" |
| 63 | + "peterson/php-form-validator": "^3.3.2" |
63 | 64 | } |
64 | 65 | ``` |
65 | 66 |
|
@@ -119,11 +120,12 @@ public function save(Request $request){ |
119 | 120 | - All are Optional `method` |
120 | 121 | - These methods are only mandatory on usage and should always come first before others. |
121 | 122 |
|
122 | | -| Methods | Description | |
123 | | -|----------|-------------------------------| |
124 | | -| ->et() | Takes param as `bool` to format error's on display: `single or multiple` | |
125 | | -| ->post() | No param needed. SET `form` request to `POST` only | |
126 | | -| ->get() | No param needed. SET `form` request to `GET` only | |
| 123 | +| Methods | Description | |
| 124 | +|-----------|-------------------------------| |
| 125 | +| ->et() | Takes param as `bool` to format error's on display: `single or multiple` | |
| 126 | +| ->token() | Takes param as `bool` to Enable or Disable `csrf_token` for each request | |
| 127 | +| ->post() | No param needed. SET `form` request to `POST` only | |
| 128 | +| ->get() | No param needed. SET `form` request to `GET` only | |
127 | 129 |
|
128 | 130 | ``` |
129 | 131 | $form->post()->submit([ |
@@ -199,6 +201,28 @@ $form->et(true)->submit([ |
199 | 201 | ]) |
200 | 202 | ``` |
201 | 203 |
|
| 204 | +### Token |
| 205 | +- Takes a param as `bool` Default is `false` |
| 206 | + - Allow disability of `csrf_token` on each form request |
| 207 | + |
| 208 | +| Error | Description | |
| 209 | +|-------|-------------------------------| |
| 210 | +| false | `Default` Will disable `csrf_token` usage | |
| 211 | +| true | This allow `csrf_token` per request only | |
| 212 | + |
| 213 | +``` |
| 214 | +$form->token(false); |
| 215 | +``` |
| 216 | + |
| 217 | +- or |
| 218 | + |
| 219 | +``` |
| 220 | +$form->token(true)->submit([ |
| 221 | + "string:country:==:0" => 'Please Select a Country', |
| 222 | + "email:email" => 'Please enter a valid email address', |
| 223 | +]) |
| 224 | +``` |
| 225 | + |
202 | 226 | ### POST |
203 | 227 | - You can call separately or Call Before any other method, if intend to use. |
204 | 228 | - This will set the Form Request to `POST` |
|
0 commit comments