Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
how can I solve this problem ? : At least one numeric character allowed without regex
if(password.search(/[0-9]/)){
    document.getElementById('fpasswords').innerHTML="*atleast one numeric character";
    return false;
}

here i used regex but i don't want to use it so what's the solution?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can check each character with the function isNaN, this function returns false is it's a numeric character and true if it's not:

const str = 'Papayas1';

for (var i = 0; i < str.length; i++) {
  
  if(!isNaN(str.charAt(i))) console.log('this is a number')
  else console.log('this is not a number')
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda