Skip to content

Commit 27356d2

Browse files
committed
Update doc
1 parent 7b6a906 commit 27356d2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,17 @@ Send request to the server using curl or postman: `curl GET "http://localhost:90
112112
```
113113

114114
### More examples
115+
116+
***Validate file***
117+
118+
* [Validate file](doc/FILE_VALIDATION.md)
119+
115120
***Validate `application/json` or `text/plain` as raw body***
116121

117122
* [Validate JSON to simple struct](doc/SIMPLE_STRUCT_VALIDATION.md)
118123
* [Validate JSON to map](doc/MAP_VALIDATION.md)
119124
* [Validate JSON to nested struct](doc/NESTED_STRUCT.md)
120125
* [Validate using custom rule](doc/CUSTOM_RULE.md)
121-
* [Validate file](doc/FILE_VALIDATION.md)
122126

123127
### Validation Rules
124128
* `alpha` The field under validation must be entirely alphabetic characters.
@@ -207,13 +211,13 @@ opts := govalidator.Options{
207211
```
208212

209213
### Contribution
210-
If you are interested to make the package better please send pull requests or create issue so that others can fix.
214+
If you are interested to make the package better please send pull requests or create an issue so that others can fix.
211215
[Read the contribution guide here](CONTRIBUTING.md)
212216

213217
### See all [contributors](https://github.com/thedevsaddam/govalidator/graphs/contributors)
214218

215219
### See [benchmarks](doc/BENCHMARK.md)
216-
### Read [API doc](https://godoc.org/github.com/thedevsaddam/govalidator)
220+
### Read [API documentation](https://godoc.org/github.com/thedevsaddam/govalidator)
217221

218222
### **License**
219223
The **govalidator** is an open-source software licensed under the [MIT License](LICENSE.md).

doc/FILE_VALIDATION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
func handler(w http.ResponseWriter, r *http.Request) {
1818
rules := govalidator.MapData{
19-
"file:photo": []string{"ext:jpg,pdf", "size:10000", "mime:jpg,png", "required"},
19+
"file:photo": []string{"ext:jpg,png", "size:10000", "mime:jpg,png", "required"},
2020
}
2121

2222
messages := govalidator.MapData{
@@ -64,3 +64,4 @@ or
6464
}
6565
}
6666
```
67+
Note: At this time it can validate only single file.

0 commit comments

Comments
 (0)