Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
Permitir lista de palabras en <textarea> antes de enviar JavaScript o jQuery

He visto algunas publicaciones similares de "Bloquear palabras en el área de texto usando JS o jQuery"

Ejemplos: Caso 1: Si la lista de palabras son: sentir, citar, solo, asistir, láser, enviar

Caso 2. Una vez que un usuario presione el botón de enviar, debería aparecer un mensaje que dice: "códigos no válidos" si alguna de esas palabras no está en la lista

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si su objetivo es verificar si una cadena dada tiene ciertas palabras, puede usar una expresión regular como:

 const regex3 = /^(?=.*\bfeel\b)(?=.*\bappointment\b)(?=.*\bonly\b)(?=.*\battend\b)(?=.*\blaser\b)(?=.*\bonly\b).*$/ig console.log(regex3.test(yourInputText)) //returns true if the string has the words in it

si desea agregar más palabras, simplemente cree más declaraciones, ejemplo:

 (?=.*\bYOUR_NEW_WORD\b)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!