salix/modules/client/back/models/client-observation.js

10 lines
303 B
JavaScript
Raw Normal View History

2017-10-11 13:36:47 +00:00
module.exports = function(Self) {
Self.validate('text', function(err) {
2017-03-10 10:18:16 +00:00
if (!this.text) err();
}, {message: 'Description cannot be blank'});
Self.validate('observationTypeFk', function(err) {
if (!this.observationTypeFk) err();
}, {message: 'type cannot be blank'});
2017-03-10 10:18:16 +00:00
};