Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
accountserver
Commits
8facee8c
Commit
8facee8c
authored
Nov 14, 2018
by
ale
Browse files
Make the blacklist validation error slightly clearer
parent
31537566
Changes
1
Hide whitespace changes
Inline
Side-by-side
validators.go
View file @
8facee8c
...
...
@@ -135,7 +135,7 @@ type ValidatorFunc func(context.Context, string) error
func
notInSet
(
set
stringSet
)
ValidatorFunc
{
return
func
(
_
context
.
Context
,
value
string
)
error
{
if
set
.
Contains
(
value
)
{
return
errors
.
New
(
"
reserved value
"
)
return
errors
.
New
(
"
invalid value (blacklisted)
"
)
}
return
nil
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment