I have the following problem.
I am using the follwing Regular Expression validator(REV) with validator expressions
^[0-9]{1,2}$
^[a-zA-Z0-9]{3,20}$
The idea of the first exp is 1 or 2 digits
the idea of second expression is username between 3 and 20 chars
When the user enters characters other than the specified REVs are working.
But if the user leaves the textbox without entering anything
Page.IsValid is true which indicates it is not performng any validation.
I read that {n,m} syntax in .net regular expressions is min(n)-max(m)
in the documentation.
Should i also use ReguiredFieldVa lidator
in addition to regular expression validator
any one facing the same problem.
where is the mistake in me or in .net 2 5564
Hi, S.Kartikeyan,
Yes, you should use a combination of RegularExpressi onValidatior and a
RequiredFieldVa lidator in order to prevent the user from leaving the
associated control blank.
It is mentioned in the Note in the Remarks section: http://msdn.microsoft.com/library/en...ClassTopic.asp
Greetings
Martin
"S.Kartikey an" <in*******@yaho o.com> wrote in message
news:6d******** *************** ***@posting.goo gle.com... I have the following problem. I am using the follwing Regular Expression validator(REV) with validator
expressions ^[0-9]{1,2}$ ^[a-zA-Z0-9]{3,20}$ The idea of the first exp is 1 or 2 digits the idea of second expression is username between 3 and 20 chars
When the user enters characters other than the specified REVs are working. But if the user leaves the textbox without entering anything Page.IsValid is true which indicates it is not performng any validation.
I read that {n,m} syntax in .net regular expressions is min(n)-max(m) in the documentation.
Should i also use ReguiredFieldVa lidator in addition to regular expression validator
any one facing the same problem.
where is the mistake in me or in .net
Thanks For your help.
I was wondering where is the mistake.
Microsoft should have designed it the otherway which is more intuitive.
S.Kartikeyan
"Martin Dechev" <de*******@hotm ail.com> wrote in message news:<Oc******* *******@TK2MSFT NGP12.phx.gbl>. .. Hi, S.Kartikeyan,
Yes, you should use a combination of RegularExpressi onValidatior and a RequiredFieldVa lidator in order to prevent the user from leaving the associated control blank.
It is mentioned in the Note in the Remarks section:
http://msdn.microsoft.com/library/en...ClassTopic.asp
Greetings Martin "S.Kartikey an" <in*******@yaho o.com> wrote in message news:6d******** *************** ***@posting.goo gle.com... I have the following problem. I am using the follwing Regular Expression validator(REV) with validator expressions ^[0-9]{1,2}$ ^[a-zA-Z0-9]{3,20}$ The idea of the first exp is 1 or 2 digits the idea of second expression is username between 3 and 20 chars
When the user enters characters other than the specified REVs are working. But if the user leaves the textbox without entering anything Page.IsValid is true which indicates it is not performng any validation.
I read that {n,m} syntax in .net regular expressions is min(n)-max(m) in the documentation.
Should i also use ReguiredFieldVa lidator in addition to regular expression validator
any one facing the same problem.
where is the mistake in me or in .net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VSK |
last post by:
Hi all,
I have a .ascx file with
dropdownbox (SSN, EmpName)
textbox
submit button
regular expression validator( controltovalidate is the above textbox)
Now i want to change the Regular Expression of the validator based on the
|
by: Nazir |
last post by:
Hi
I'm using a regular expression validator, but if spaces are entered,
it bypasses the validation!
I'm using
^{5,100}$
|
by: Dot net work |
last post by:
Hello.
Say I have a .net textbox that uses a .net regularexpressionvalidator.
If the regular expression fails, is it possible to launch a small
client side javascript function to do something, such as change the
border color of the textbox to red? That would look quite nice: if
the expression fails, the red validator text is shown, plus...
|
by: Daniel |
last post by:
I would like to get some help on regular expression to validate
decimal numbers. It should also match negative value, empty value.
The expression:
^(\-){0,1}({1}{0,8}(\,{3})*(\.{0,8})?|{1}{0,}(\.{0,8})?|0(\.{0,8})?|(\.{1,8})?)$
is doing this job, but matches a single hyphen "-" also.
For example: matches -12.34 but also matches -
I...
|
by: Scott Natwick |
last post by:
Can anyone suggest a good reference for Regular Expressions?
Or more specifically, I need to check that a user has made a selection from
Drop Down List. The default in my Drop Down List is "". I
need a Regular Expression to trigger if this default value has not changed.
Any ideas?
Thanks in advance,
Scott Natwick
| |
by: John . |
last post by:
I am using the Regular Expression Validator control to validate a
correct email address. But, at the same time I would like to make it a
required field.
I tested by using just the regular expression validator expecting a
message to be displayed but it let me submit the form. Do I have to use
both?
|
by: kieran |
last post by:
Hi,
I am using Visual Studio 2005 and am trying to use a Regular Expression
Validator control.
I have a drop down list which contains various names, the first one is
"Please Select". I want the user to have to select a name other than
'Please Select'.
I am thinking maybe the Regular Expression Validator is the best move
|
by: CK |
last post by:
Hello All,
I have a page with a text box. It has a required field validator, and a
regualur expression validator tied to it. A valid email is required. When
clientside is enabled it works great. When it's disabled the server side
validation works for the required field, but the server side doesn't work
for the regEx validator. Any ideas?...
|
by: David |
last post by:
I'm having trouble getting the regular expression validator to work
with a text box.
In this simple example I only want lower case letters to be allowed.
So I tried the following and it doesn't work, would somebody be so
kind as to tell me why.
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |