validar número

This commit is contained in:
xXpuma99Xx
2022-01-02 18:25:31 -06:00
parent 9a982a215f
commit 481096e851
12 changed files with 54 additions and 15 deletions
+6 -1
View File
@@ -67,7 +67,12 @@ const update = async (body, files) => {
200
);
if (body.telefono)
dataUpdate.telefono = validar.validarNumero(body.telefono, 15);
dataUpdate.telefono = validar.validarNumero(
body.telefono,
'teléfono',
true,
15
);
if (validar.validarObjetoVacio(dataUpdate))
throw new Error(
'No se envio nada para actualizar este Servicio Social'