473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Entry validation

Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

pls help
Mar 2 '07 #1
2 908
On Mar 2, 2:28 am, Badis <B...@discussions.microsoft.comwrote:
Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.
Try this

"\A([^\|\$|\^]*)\Z"

Mar 2 '07 #2
Badis,

There are few tools on regular expressions available. This will help you to
figure out thecomplex regular expressions you want.

An msdn artilces is recommending the following tool
http://tools.osherove.com/CoolTools/...5/Default.aspx

But i found the following regular expression tool more useful
http://www.sellsbrothers.com/tools/

--
Thanks & Regards,
Sundar Narasiman
"Alexey Smirnov" wrote:
On Mar 2, 2:28 am, Badis <B...@discussions.microsoft.comwrote:
Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

Try this

"\A([^\|\$|\^]*)\Z"

Mar 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Otto Krüse | last post by:
Hi everyone, I'm building a GUI in which I want, amongst other things, for people to fill in there postal code. The postal codes of my country (Holland) are in this format: 1234 AB So for the...
3
by: pilar | last post by:
Hi All, How can I validate the entry in a text field depending on the first letter of the string. I need to have a text box to acept 14 characters if the first letter entered is M and 17...
1
by: danavni | last post by:
I have a form where the user need to fill some fields. some of these fields are address fields (street, city, state, zip) i want to validate that atleast one of these fields if filled with data....
3
by: nt8jbwu02 | last post by:
I would like to allow a user to enter an ip address (quad octet format: www.xxx.yyy.zzz) in a combo box and then add it to the list when they have completed the entry. How can I do this? The...
5
by: peev2001 | last post by:
Hi every body, I have some basic queries regarding validation of data entered by different users: I have a form from where the users are going to enter the data. I have tried to put some...
2
by: Rich Kayton | last post by:
In an order entry system I want to validate that the company ID entered is one that exists in a related table. I don't want to use a lookup value since the list would be too long. I just want to...
8
by: libsfan01 | last post by:
how can i use regular expressions to ensure a mysql format date entry in a text field? thanks marc
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
9
by: AMBLY | last post by:
Hello ! Could someone please help me with this? I have a ComboBox named cboSTATUS with a limited Value List, bound to Col1.. Values : "Yes";" No";" Completed" The selected Value is stored in...
2
Strider1066
by: Strider1066 | last post by:
Is it a bug or a feature? I'm trying to sub-class an Entry widget that displays a template (i.e. '____-__-__') for users and does keystroke validation. It is starting to work but with one problem....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.