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

10 lines
303 B
JavaScript

module.exports = function(Self) {
Self.validate('text', function(err) {
if (!this.text) err();
}, {message: 'Description cannot be blank'});
Self.validate('observationTypeFk', function(err) {
if (!this.observationTypeFk) err();
}, {message: 'type cannot be blank'});
};