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

129
Vistas
Additional method JQuery validation with German special characters

I would like to use JQuery Validation to validate a text input field for text input. But with spaces and the german special characters (äöüß).

For this I have created an additional method "letterspecial":

    jQuery.validator.addMethod("letterspecial", function(value, element) {
    return this.optional(element) || /^[a-zA-Z\u0196\u0228\u0214\u0246\u0220\u0252\u0223]+$/.test(value);
}, "Letters only please with Special Charts and Spaces allow");

I'm pretty sure it's the RegEx, however I don't know how to set it correctly.

But maybe there is another solution?

Thanks a lot

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

0

You can simply use äöüß in your regex, no need for escaped unicode characters, as far as I can tell :

const regex = /^[a-zA-Zäöüß]+$/;

console.log(regex.test("üßeörgä"))
console.log(regex.test("héhé this is invalid hôhô"))

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