Solved

Jquery Form to Accept German Characters

Posted on 2013-01-29
2
359 Views
Last Modified: 2013-01-29
Hi All ...

I have a form using the JqueryUI Dialog library.
Within there is a name field which is set as required, but I need it to accept foreign characters (German to be more exact) which is doesn't at the moment.

The validation code (which uses regex) is as follows:
bValid = bValid && checkRegexp( name, /^[A-Z0-9 _]*$/i, "Name is missing" );

Open in new window

I need it to accept the following ä,ö,ü,ß characters too.  

How can I adjust the above line to cater for this?

Many Thanks
0
Comment
Question by:Shafiq Khan
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38831542
try this:

bValid = bValid && checkRegexp( name, /^[A-Z0-9 _äöüß]*$/i, "Name is missing" );

Open in new window

0
 
LVL 1

Author Closing Comment

by:Shafiq Khan
ID: 38831601
Many Thanks Sedwick.  That did the trick!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question