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

merged 2 commits into from May 9, 2013


None yet

4 participants

durango commented May 9, 2013

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

@sdepold sdepold commented on an outdated diff May 9, 2013
@@ -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));
sdepold May 9, 2013 Member

maybe hasAllowedNull ?

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

1 check passed

default The Travis CI build passed
edgarjs commented May 15, 2013

is this pushed to the last version in npm?



NPM was last updated 16 days ago, so no

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

@edgarjs This has now been published to npm

edgarjs commented May 26, 2013


On Sun, May 26, 2013 at 5:24 AM, Jan Aagaard Meier wrote:

@edgarjs This has now been published to npm

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

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