Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
91886a45
authored
2015-03-27 13:30:59 +0800
by
pylemon
Committed by
astaxie
2015-05-25 09:10:35 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bugfix: if a form field type is bool, valid Required should always return true i…
…nstead of return its value.
1 parent
a7e60c93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
validation/validators.go
validation/validators.go
View file @
91886a4
...
...
@@ -64,8 +64,8 @@ func (r Required) IsSatisfied(obj interface{}) bool {
if
str
,
ok
:=
obj
.
(
string
);
ok
{
return
len
(
str
)
>
0
}
if
b
,
ok
:=
obj
.
(
bool
);
ok
{
return
b
if
_
,
ok
:=
obj
.
(
bool
);
ok
{
return
true
}
if
i
,
ok
:=
obj
.
(
int
);
ok
{
return
i
!=
0
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment