govalidator icon indicating copy to clipboard operation
govalidator copied to clipboard

Validate Golang request data with simple rules. Highly inspired by Laravel's request validation.

Results 45 govalidator issues
Sort by recently updated
recently updated
newest added

Added `ValidateStruct` to the list of functions that are run with custom rules.

In this file: https://github.com/thedevsaddam/govalidator/blob/9aa754d584410c79e165fe6897bae5643dea6b90/rules.go In case value is float32 or float64, you return a message and it can not custom. Why?

Would it be possible to return the error bag on the first failure as opposed to running all the rules. 1. Bail when the first rule in a ruleset for...

Hi, thanks for this great library! So I know that the 'required' struct tag raises an error if you provide an integer that equals 0. I know why this is...

**Comparison rules addded:** - Rule functions have access to the entire form in order to be able to compare one field with another. - Can be used to add more...

This fixes an issue preventing pointer from being pushed in roller.

I copied the direct validation example to the playground https://play.golang.org/p/ygjhVZg59cf and I got the following error: ``` go: finding github.com/thedevsaddam/govalidator v1.9.8 go: downloading github.com/thedevsaddam/govalidator v1.9.8 go: extracting github.com/thedevsaddam/govalidator v1.9.8 #...

``` rules := govalidator.MapData{ "title": []string{"required"}, "description": []string{"required", "min:4", "max:20"}, "file:image": []string{ "mime:image/jpg,image/png"}, "file:file": []string{ "mime:video/mp4","size:1000"}, } messages := govalidator.MapData{ "title": []string{"required: Is Required"}, "description": []string{"required: Is Required","max: must be...

I was playing with json validation and found, that there is a problem with the **omitifempty** flag in the json field. Please check my example at https://play.golang.org/p/54aCchWnusM When I remove...

This, completely valid url, fails url validation: `https://example.com/app?value=two%20words` Solution proposed in PR #75