notes: Crear

This commit is contained in:
Vicente Falco 2017-03-10 11:18:16 +01:00
parent 5e66bef50c
commit 4bc1cf455b
3 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,4 @@
module.exports = function(ClientObservation) {
ClientObservation.validate('text', isEnabled, {message: 'Se debe rellenar el campo de texto'});
function isEnabled(err) {
if (!this.text) err();

View File

@ -24,9 +24,9 @@
"model": "SalesPerson",
"foreignKey": "id"
},
"client": {
"clients": {
"type": "hasOne",
"model": "Client",
"type": "belongsTo",
"foreignKey": "id"
}
}