Validaciones RC2

This commit is contained in:
Juan Ferrer Toribio 2017-02-02 13:48:25 +01:00
parent 4c2c6ab7d0
commit 06accec04a
1 changed files with 1 additions and 0 deletions

View File

@ -5,6 +5,7 @@ module.exports = function(Client) {
Client.validatesPresenceOf('socialName', {message: 'Debe especificarse la razón social'}); Client.validatesPresenceOf('socialName', {message: 'Debe especificarse la razón social'});
Client.validatesFormatOf('postcode', {with: /^\d+$/, message: 'El código postal solo debe contener números'}); Client.validatesFormatOf('postcode', {with: /^\d+$/, message: 'El código postal solo debe contener números'});
Client.validatesLengthOf('postcode', {min: 3, max: 10}); Client.validatesLengthOf('postcode', {min: 3, max: 10});
Client.validatesFormatOf('email', {with: /^[\w|\.|\-]+@\w[\w|\.|\-]*\w$/, message: 'Correo electrónico inválido'});
Client.validate('payMethod', hasCC, {message: 'Introduzca el iban del cliente'}); Client.validate('payMethod', hasCC, {message: 'Introduzca el iban del cliente'});
function hasCC(err) { function hasCC(err) {