-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- new uuid validator - add testcases - print warning message if uuid and regex validator is set for a field - ignore the regex and uuid validator if both are set for a field. - adding the string_not_empty validator to the example, makes it clearer that uuid_ver otherwise allows empty string
- Loading branch information
1 parent
c00cd28
commit 710a5f4
Showing
11 changed files
with
548 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
syntax = "proto3"; | ||
package validator.examples; | ||
import "github.com/mwitkow/go-proto-validators/validator.proto"; | ||
|
||
message UUIDMsg { | ||
// user_id must be a valid version 4 UUID. | ||
string user_id = 1 [(validator.field) = {uuid_ver: 4, string_not_empty: true}]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.