From daaf73a143be24d740d4f0e55aa80ea72061c8f9 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 26 May 2017 14:44:56 +0200 Subject: [PATCH] Errores validacion solucionados --- services/client/common/models/Client.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/services/client/common/models/Client.js b/services/client/common/models/Client.js index 73d6fca6a..91f5f7bbd 100644 --- a/services/client/common/models/Client.js +++ b/services/client/common/models/Client.js @@ -37,13 +37,6 @@ module.exports = function(Client) { max: 23 }); - Client.validate('payMethod', hasCC, { - message: 'El método de pago seleccionado requiere que se especifique IBAN del cliente' - }); - function hasCC(err) { - if (this.payMethod == 2 && !this.iban) err(); - }; - Client.validate('payMethod', hasSalesMan, { message: 'No se puede cambiar la forma de pago si no hay comercial asignado' }); @@ -52,7 +45,7 @@ module.exports = function(Client) { }; Client.validateAsync('payMethodFk', hasIban, { - message: 'Tiene que rellenar el IBAN' + message: 'El método de pago seleccionado requiere que se especifique el IBAN' }); function hasIban(err, done) { let iban = this.iban;