Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > RegularExpressionValidator and Int'l characters

Reply
Thread Tools

RegularExpressionValidator and Int'l characters

 
 
Tomasz J
Guest
Posts: n/a
 
      11-08-2007
Hello Developers,

Is there any easy way of validating user input, like last name, using
RegularExpressionValidator which would allow for international characters?

Apprently ValidationExpression="^[\w\s']+$" is not the right way to do it.

Thank you for any hints.

Tomasz J


 
Reply With Quote
 
 
 
 
PJ on Development
Guest
Posts: n/a
 
      11-08-2007
Hello, Tomasz

Apparently your RegEx expression is a bit weird. For what I can gather
you want to accept letters, space and a single quote char ('). Am I
right?

So I think that a RexEx expression like "^((\w|')+\s+?)$" (without the
outer quotes) should do the trick.

However the validation needs to be done on the server (and making sure
that the Cuture of the page is set) because the JavaScript does not
handle internationalization very well.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Nov 8, 7:12 pm, "Tomasz J" <(E-Mail Removed)> wrote:
> Hello Developers,
>
> Is there any easy way of validating user input, like last name, using
> RegularExpressionValidator which would allow for international characters?
>
> Apprently ValidationExpression="^[\w\s']+$" is not the right way to do it.
>
> Thank you for any hints.
>
> Tomasz J



 
Reply With Quote
 
 
 
 
Tomasz J
Guest
Posts: n/a
 
      11-09-2007
I am not sure why you said my expression is weird - it looks fine to me.
But it is a very good point! I probably should set
EnableClientScript="false".

Thank you.

Tomasz


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RegularExpressionValidator that limits the number of characters that can be entered Nathan Sokalski ASP .Net 9 01-08-2007 06:36 AM
RegularExpressionValidator that limits the number of characters that can be entered Nathan Sokalski ASP .Net Web Controls 9 01-08-2007 06:36 AM
using RegularExpressionValidator and RequiredFieldValidator together???? Brian ASP .Net 2 04-15-2005 07:17 PM
RegularExpressionValidator and Globalization =?Utf-8?B?TWF0dCBNb3JyaXM=?= ASP .Net 0 02-16-2005 02:41 PM
RegularExpressionValidator and Greek Characters Matt Morris ASP .Net Web Controls 0 02-14-2005 07:59 PM



Advertisments