MCPcopy Create free account
hub / github.com/dresende/node-orm2 / setupAlwaysValidate

Function setupAlwaysValidate

test/integration/validation.js:39–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

validation.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected