validar numero

This commit is contained in:
xXpuma99Xx
2022-01-03 17:05:29 -06:00
parent 1b32dcb96a
commit 07e160d8b8
9 changed files with 65 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ const crear = async (body) => {
'id usuario',
true
);
const telefono = validar.validarNumero(body.telefono, false, 15);
const telefono = validar.validarNumero(body.telefono, 'teléfono', true, 15);
const password = encriptar.generarPassword();
let correo = '@pcpuma.acatlan.unam.mx';
+8 -1
View File
@@ -6,7 +6,14 @@ const TipoUsuario = require(`${dbPath}/TipoUsuario`);
const Usuario = require(`${dbPath}/Usuario`);
const usuarios = async (body) => {
const pagina = validar.validarNumero(body.pagina, true);
const pagina = validar.validarNumero(
body.pagina,
'página',
false,
null,
true,
true
);
// filtros
return Usuario.findAndCountAll({