Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
accountserver
Commits
8facee8c
Commit
8facee8c
authored
Nov 14, 2018
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the blacklist validation error slightly clearer
parent
31537566
Pipeline
#1543
passed with stages
in 1 minute and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
validators.go
validators.go
+1
-1
No files found.
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
Markdown
is supported
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