validar texto
This commit is contained in:
@@ -23,10 +23,10 @@ const nuevo = async (body, file) => {
|
||||
200
|
||||
);
|
||||
const institucion = body.institucion
|
||||
? validar.validarTexto(body.institucion, 'El texto institucion.', 200)
|
||||
? validar.validarTexto(body.institucion, 'institucion', false, 200)
|
||||
: '';
|
||||
const dependencia = body.dependencia
|
||||
? validar.validarTexto(body.dependencia, 'El texto dependencia.', 200)
|
||||
? validar.validarTexto(body.dependencia, 'dependencia', false, 200)
|
||||
: '';
|
||||
const motivo = body.motivo
|
||||
? validar.validarNumero(body.motivo, 'El texto motivo.', 1)
|
||||
|
||||
@@ -12,7 +12,7 @@ const serviciosEspeciales = async (body) => {
|
||||
? { idStatus: validar.validarNumeroEntero(body.idStatus, 'id status') }
|
||||
: { idStatus: { [Op.gt]: 10 } };
|
||||
const nombre = body.nombre
|
||||
? validar.validarTexto(body.nombre, 'El nombre', 60)
|
||||
? validar.validarTexto(body.nombre, 'nombre', true, 60)
|
||||
: '';
|
||||
const numeroCuenta = body.numeroCuenta
|
||||
? validar.validarNumeroCuenta(body.numeroCuenta)
|
||||
|
||||
@@ -29,13 +29,15 @@ const update = async (body) => {
|
||||
if (body.institucion)
|
||||
dataUpdate.institucion = validar.validarTexto(
|
||||
body.institucion,
|
||||
'El texto institucion.',
|
||||
'institucion',
|
||||
false,
|
||||
200
|
||||
);
|
||||
if (body.dependencia)
|
||||
dataUpdate.dependencia = validar.validarTexto(
|
||||
body.dependencia,
|
||||
'El texto dependencia.',
|
||||
'dependencia',
|
||||
false,
|
||||
200
|
||||
);
|
||||
if (body.motivo)
|
||||
|
||||
Reference in New Issue
Block a user