RegularExpressionValidator bug on firefox

D

Dave Weeden

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 (e-mail address removed) 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 (e-mail address removed) 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
 
D

Dave Weeden

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 '(e-mail address removed)' as expected
2) Validation is not attempted when the saved form field is selected with
the mouse (or the keyboard under IE)
 
S

Steven Cheng [MSFT]

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/feedback/default.aspx?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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
From: =?Utf-8?B?RGF2ZSBXZWVkZW4=?= <[email protected]>
References: <[email protected]>
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 '(e-mail address removed)' 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 (e-mail address removed) 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 (e-mail address removed) 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
 
D

Dave Weeden

Thanks Steven,

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

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=354930

Steven Cheng said:
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/feedback/default.aspx?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:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
From: =?Utf-8?B?RGF2ZSBXZWVkZW4=?= <[email protected]>
References: <[email protected]>
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 '(e-mail address removed)' 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 (e-mail address removed) 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 (e-mail address removed) 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
 
S

Steven Cheng [MSFT]

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:
(e-mail address removed).


--------------------
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top