RegularExpressionValidator bug on firefox

Discussion in 'ASP .Net' started by Dave Weeden, Jul 2, 2008.

  1. Dave Weeden

    Dave Weeden Guest

    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 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 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
     
    Dave Weeden, Jul 2, 2008
    #1
    1. Advertising

  2. Dave Weeden

    Dave Weeden Guest

    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 '' 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 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 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
    >
    >
    >
     
    Dave Weeden, Jul 2, 2008
    #2
    1. Advertising

  3. 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:
    .

    ==================================================
    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=?= <>
    >References: <>
    >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 '' 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 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 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
    >>
    >>
    >>

    >
     
    Steven Cheng [MSFT], Jul 3, 2008
    #3
  4. Dave Weeden

    Dave Weeden Guest

    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 [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/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:
    > .
    >
    > ==================================================
    > 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=?= <>
    > >References: <>
    > >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 '' 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 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 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
    > >>
    > >>
    > >>

    > >

    >
    >
     
    Dave Weeden, Jul 3, 2008
    #4
  5. 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:
    .


    --------------------
    >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/VisualStudio/feedback/ViewFeedback.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/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:
    >> .
    >>>>
     
    Steven Cheng [MSFT], Jul 4, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oleg Ogurok
    Replies:
    1
    Views:
    6,378
    William F. Robertson, Jr.
    Jun 25, 2003
  2. Helixpoint

    RegularExpressionValidator for money??

    Helixpoint, Jun 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,819
    Helixpoint
    Jul 1, 2003
  3. =?Utf-8?B?RW56byBNYXJpbmVsbGk=?=

    Bug? - RegularExpressionValidator on a MultiLine TextBox

    =?Utf-8?B?RW56byBNYXJpbmVsbGk=?=, May 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,459
    Martin Dechev
    May 6, 2004
  4. Brett

    RegularExpressionValidator in Firefox

    Brett, Feb 11, 2008, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    150
    Brett
    Feb 11, 2008
  5. Howard Kaikow

    Bug in my Javascript or bug in Firefox

    Howard Kaikow, Nov 28, 2004, in forum: Javascript
    Replies:
    9
    Views:
    159
    Howard Kaikow
    Dec 1, 2004
Loading...

Share This Page