473,387 Members | 1,495 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,387 software developers and data experts.

RegularExpressionValidator bug on firefox

Hi,

I seem to have found a bug in the regular expression validator under firefox
2.0.0.15 when I use saved form field values. Specifically I have an email
address validator for a text box that uses the expression below.

^\s*([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}\s*$

When I first enter an email address such as a@b.com everything works as
expected. On subsequent visits to the form, when I type the 'a' character
the text box spawns a drop down within which I can select a@b.com using the
arrow keys and confirm the selection using the enter key.

At that point my red "invalid email" address of the validator comes up
though I can actually submit the form no problem as the data entered should
in fact pass validation and does in fact do so during submission. The
message should not be coming up at all.

Also, strangely enough when I select that saved form value using the mouse
the eror message does not come up.

Could anyone shed any light on this issue?

Thanks,

Dave

Jul 2 '08 #1
4 2077
I tried adding a CustomValidator to probe what's happening by observing the
value of arguments.Value in the client javascript handler. This showed the
following:

1) Under firefox, the page attempts to valid the partially typed in value
when a saved value is selected via the enter key. i.e. it's trying to
valiate the 'a' and not the entire 'a@b.com' as expected
2) Validation is not attempted when the saved form field is selected with
the mouse (or the keyboard under IE)
Hi,

I seem to have found a bug in the regular expression validator under firefox
2.0.0.15 when I use saved form field values. Specifically I have an email
address validator for a text box that uses the expression below.

^\s*([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}\s*$

When I first enter an email address such as a@b.com everything works as
expected. On subsequent visits to the form, when I type the 'a' character
the text box spawns a drop down within which I can select a@b.com using the
arrow keys and confirm the selection using the enter key.

At that point my red "invalid email" address of the validator comes up
though I can actually submit the form no problem as the data entered should
in fact pass validation and does in fact do so during submission. The
message should not be coming up at all.

Also, strangely enough when I select that saved form value using the mouse
the eror message does not come up.

Could anyone shed any light on this issue?

Thanks,

Dave
Jul 2 '08 #2
Hi Dave,

I think your analysis on the behavior is reasonable. The validation code
should have coded the validation rule differently for enter key and mouse
selection cases (for the autocomplete feature in browser).

for this behavior, I would suggest you post it to the visual studio connect
site (or if any existing issue there, you can also vote on it). Thus, the
dev team can also hear more on this:

http://connect.microsoft.com/feedbac...spx?SiteID=210

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
>From: =?Utf-8?B?RGF2ZSBXZWVkZW4=?= <dw*****@newsgroup.nospam>
References: <24**********************************@microsoft.co m>
Subject: RE: RegularExpressionValidator bug on firefox
Date: Wed, 2 Jul 2008 15:27:01 -0700
>
I tried adding a CustomValidator to probe what's happening by observing
the
>value of arguments.Value in the client javascript handler. This showed
the
>following:

1) Under firefox, the page attempts to valid the partially typed in value
when a saved value is selected via the enter key. i.e. it's trying to
valiate the 'a' and not the entire 'a@b.com' as expected
2) Validation is not attempted when the saved form field is selected with
the mouse (or the keyboard under IE)
>Hi,

I seem to have found a bug in the regular expression validator under
firefox
>2.0.0.15 when I use saved form field values. Specifically I have an
email
>address validator for a text box that uses the expression below.

^\s*([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}\s*$
>>
When I first enter an email address such as a@b.com everything works as
expected. On subsequent visits to the form, when I type the 'a'
character
>the text box spawns a drop down within which I can select a@b.com using
the
>arrow keys and confirm the selection using the enter key.

At that point my red "invalid email" address of the validator comes up
though I can actually submit the form no problem as the data entered
should
>in fact pass validation and does in fact do so during submission. The
message should not be coming up at all.

Also, strangely enough when I select that saved form value using the
mouse
>the eror message does not come up.

Could anyone shed any light on this issue?

Thanks,

Dave
Jul 3 '08 #3
Thanks Steven,

I have done so and anyone else can see the result at:

https://connect.microsoft.com/Visual...dbackID=354930

"Steven Cheng [MSFT]" wrote:
Hi Dave,

I think your analysis on the behavior is reasonable. The validation code
should have coded the validation rule differently for enter key and mouse
selection cases (for the autocomplete feature in browser).

for this behavior, I would suggest you post it to the visual studio connect
site (or if any existing issue there, you can also vote on it). Thus, the
dev team can also hear more on this:

http://connect.microsoft.com/feedbac...spx?SiteID=210

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
From: =?Utf-8?B?RGF2ZSBXZWVkZW4=?= <dw*****@newsgroup.nospam>
References: <24**********************************@microsoft.co m>
Subject: RE: RegularExpressionValidator bug on firefox
Date: Wed, 2 Jul 2008 15:27:01 -0700

I tried adding a CustomValidator to probe what's happening by observing
the
value of arguments.Value in the client javascript handler. This showed
the
following:

1) Under firefox, the page attempts to valid the partially typed in value
when a saved value is selected via the enter key. i.e. it's trying to
valiate the 'a' and not the entire 'a@b.com' as expected
2) Validation is not attempted when the saved form field is selected with
the mouse (or the keyboard under IE)
Hi,

I seem to have found a bug in the regular expression validator under
firefox
2.0.0.15 when I use saved form field values. Specifically I have an
email
address validator for a text box that uses the expression below.

^\s*([a-zA-Z0-9_-]+\.)*[a-zA-Z0-9_-]+@([a-zA-Z0-9_-]+\.)+[a-zA-Z]{2,4}\s*$
>
When I first enter an email address such as a@b.com everything works as
expected. On subsequent visits to the form, when I type the 'a'
character
the text box spawns a drop down within which I can select a@b.com using
the
arrow keys and confirm the selection using the enter key.

At that point my red "invalid email" address of the validator comes up
though I can actually submit the form no problem as the data entered
should
in fact pass validation and does in fact do so during submission. The
message should not be coming up at all.

Also, strangely enough when I select that saved form value using the
mouse
the eror message does not come up.

Could anyone shed any light on this issue?

Thanks,

Dave

Jul 3 '08 #4
Thanks for sharing this Dave,

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
--------------------
>Thread-Topic: RegularExpressionValidator bug on firefox
thread-index: AcjdRkJXX2eXp2ZfQnWwoe+rZSrUdQ==
Subject: RE: RegularExpressionValidator bug on firefox
Date: Thu, 3 Jul 2008 12:52:01 -0700
>
Thanks Steven,

I have done so and anyone else can see the result at:
https://connect.microsoft.com/Visual...ck.aspx?Feedba
ckID=354930
>
"Steven Cheng [MSFT]" wrote:
>Hi Dave,

I think your analysis on the behavior is reasonable. The validation code
should have coded the validation rule differently for enter key and
mouse
>selection cases (for the autocomplete feature in browser).

for this behavior, I would suggest you post it to the visual studio
connect
>site (or if any existing issue there, you can also vote on it). Thus,
the
>dev team can also hear more on this:

http://connect.microsoft.com/feedbac...spx?SiteID=210

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
>>>>
Jul 4 '08 #5

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

Similar topics

0
by: Andy Eshtry | last post by:
I have a radio button list, a textbox representing SIN or EIN based on my radio button list selection so I put 2 regularexpressionvalidator to evaluate the value of textbox. EIN must be (for...
3
by: Ricardo Corsi P. Cesar | last post by:
Hi, i looking for example in asp.net (VB) to make the RegularExpressionValidator in runtime in my code behind. I found some similars codes, but nothing in VB.. thanks!
3
by: DC | last post by:
I have this snippet: <tr> <td align="left">E-mail</td> <td> <asp:TextBox id="txtEmail" runat="server" MaxLength="100"></asp:TextBox>&nbsp; <asp:RegularExpressionValidator id="revEmail"...
0
by: Matt Morris | last post by:
Hello: I have a RegularExpressionValidator control attached to a TextBox. I have the ValidationExpression property set to a very simple validation expression (\w+). The validation always fails...
1
by: franz | last post by:
does anybody tell me why it doesn't works?? in any case gg beame true thanks franz Dim y As RegularExpressionValidator = New RegularExpressionValidator y.ValidationExpression =...
1
by: John Yopp | last post by:
I'm trying to use a asp:RegularExpressionValidator to validate the strength of a password. When I test the regular expression with Regex.IsMatch, it works perfectly. However, when used within a...
4
by: simonZ | last post by:
I have RegularExpressionValidator which validate one text box. When my text box is validated on client I would like to do something else. Is there some client event of RegularExpressionValidator?...
4
by: =?Utf-8?B?Y3VyaW91cw==?= | last post by:
I am using a RegularExpressionValidator to validate a TextBox. I use "^?+(\.*)?$" to check for a real number. The control works fine as long as the user enters something in the TextBox; it does not...
0
by: alastair.slater | last post by:
Hi all, Can anyone help please? I'm using the following code to validate a password entered by new users in an <asp:Textbox ... />: <asp:RegularExpressionValidator ID="RegularPassword"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
marktang
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,...
0
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...
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...

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.