New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validations will now be called upon .save() and allowNull: true skips va... #601

Merged
merged 2 commits into from May 9, 2013

Conversation

4 participants
@durango
Member

durango commented May 9, 2013

...lidations (if the value is null).

lib/dao.js Outdated
@@ -211,7 +218,9 @@ module.exports = (function() {
Utils._.each(self.values, function(value, field) {
// if field has validators
if (self.validators.hasOwnProperty(field)) {
var allowsNulls = (self.rawAttributes[field].allowNull && self.rawAttributes[field].allowNull === true && (value === null || value === undefined));

This comment has been minimized.

@sdepold

sdepold May 9, 2013

Member

maybe hasAllowedNull ?

durango added a commit that referenced this pull request May 9, 2013

Merge pull request #601 from durango/validate-save-null
Validations will now be called upon .save() and allowNull: true skips validations

@durango durango merged commit d7a96a1 into sequelize:master May 9, 2013

1 check passed

default The Travis CI build passed
Details
@edgarjs

This comment has been minimized.

edgarjs commented May 15, 2013

is this pushed to the last version in npm?

Thanks

@janmeier

This comment has been minimized.

Member

janmeier commented May 15, 2013

NPM was last updated 16 days ago, so no https://npmjs.org/package/sequelize.

You might bug @sdepold to push it, but I don't know his criteria for pushing new versions.

@durango durango deleted the durango:validate-save-null branch May 15, 2013

@janmeier

This comment has been minimized.

Member

janmeier commented May 26, 2013

@edgarjs This has now been published to npm

@edgarjs

This comment has been minimized.

edgarjs commented May 26, 2013

thanks!

On Sun, May 26, 2013 at 5:24 AM, Jan Aagaard Meier
notifications@github.com wrote:

@edgarjs This has now been published to npm

Reply to this email directly or view it on GitHub:
#601 (comment)

@sdepold

This comment has been minimized.

Member

sdepold commented May 26, 2013

omg :) how cool is this PR ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment