| 37 | return next(); |
| 38 | }; |
| 39 | var setupAlwaysValidate = function () { |
| 40 | return function (done) { |
| 41 | Person2 = db.define("person2", { |
| 42 | name: { type: 'text' }, |
| 43 | mustbenull: { type: 'text', required:false, alwaysValidate: true } |
| 44 | , canbenull: { type: 'text', required:false } |
| 45 | }, { |
| 46 | validations: { |
| 47 | name: ORM.validators.rangeLength(3, 30), |
| 48 | mustbenull: notNull, |
| 49 | canbenull: notNull |
| 50 | } |
| 51 | }); |
| 52 | return helper.dropSync(Person2, done); |
| 53 | }; |
| 54 | }; |
| 55 | |
| 56 | before(function (done) { |
| 57 | helper.connect(function (connection) { |