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

127
Views
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 answers
Answer question

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 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!