Skip to content

Commit e8ae8d8

Browse files
authored
Merge pull request #342 from shalvah/update-doc
Update doc to address custom validation rules
2 parents ebbcda6 + 2f7e040 commit e8ae8d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class ExampleController extends Controller {
121121

122122
#### Form request validation rules
123123

124-
To display a list of valid parameters, your API methods accepts, this package uses Laravels [Form Requests Validation](https://laravel.com/docs/5.2/validation#form-request-validation).
124+
To display a list of valid parameters, your API methods accepts, this package uses Laravel's [Form Requests Validation](https://laravel.com/docs/5.2/validation#form-request-validation).
125125

126126

127127
```php
@@ -138,6 +138,9 @@ public function rules()
138138

139139
**Result:** ![Form Request](http://marcelpociot.de/documentarian/form_request.png)
140140

141+
### A note on custom validation rules
142+
This package only supports custom rules defined as classes. You'll also need to define a `__toString()` method in the class, which should return the description that would be displayed in the generated doc.
143+
141144
#### Controller method doc block
142145
It is possible to override the results for the response. This will also show the responses for other request methods then GET.
143146

0 commit comments

Comments
 (0)