Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 66678390
authored
Mar 10, 2014
by
Thanasis Polychronakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
watch for undefined values too before triggering validators
1 parent
a14173af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
lib/dao-validator.js
test/dao.test.js
lib/dao-validator.js
View file @
6667839
...
@@ -244,9 +244,8 @@ DaoValidator.prototype._customValidators = function() {
...
@@ -244,9 +244,8 @@ DaoValidator.prototype._customValidators = function() {
*/
*/
DaoValidator
.
prototype
.
_builtinAttrValidate
=
function
(
value
,
field
)
{
DaoValidator
.
prototype
.
_builtinAttrValidate
=
function
(
value
,
field
)
{
var
self
=
this
;
var
self
=
this
;
// check if value is null (if null not allowed the Schema pass will capture it)
// check if value is null (if null not allowed the Schema pass will capture it)
if
(
value
===
null
)
{
if
(
value
===
null
||
typeof
value
===
'undefined'
)
{
return
Promise
.
resolve
();
return
Promise
.
resolve
();
}
}
...
...
test/dao.test.js
View file @
6667839
...
@@ -57,7 +57,9 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
...
@@ -57,7 +57,9 @@ describe(Support.getTestDialectTeaser("DAO"), function () {
expect
(
u2
.
username
).
to
.
equal
(
bio
)
expect
(
u2
.
username
).
to
.
equal
(
bio
)
done
()
done
()
})
})
})
}).
error
(
function
(
err
)
{
done
(
err
);
});
})
})
})
})
...
...
Write
Preview
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