Validaciones RC2
This commit is contained in:
parent
4c2c6ab7d0
commit
06accec04a
|
@ -5,6 +5,7 @@ module.exports = function(Client) {
|
|||
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.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'});
|
||||
function hasCC(err) {
|
||||
|
|
Loading…
Reference in New Issue