Entry validation

Discussion in 'ASP .Net' started by =?Utf-8?B?QmFkaXM=?=, Mar 2, 2007.

  1. 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
    =?Utf-8?B?QmFkaXM=?=, Mar 2, 2007
    #1
    1. Advertising

  2. On Mar 2, 2:28 am, Badis <> wrote:
    > 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"
    Alexey Smirnov, Mar 2, 2007
    #2
    1. Advertising

  3. 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/Regulator/tabid/185/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 <> wrote:
    > > 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"
    >
    >
    =?Utf-8?B?U3VuZGFyIE5hcmFzaW1hbg==?=, Mar 2, 2007
    #3
    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. sviau
    Replies:
    1
    Views:
    360
    Steven Cheng[MSFT]
    Mar 3, 2004
  2. AtomicBob
    Replies:
    14
    Views:
    857
    Toby Inkster
    May 2, 2006
  3. Mike Owen

    Allowing entry of a Carriage Return during data entry

    Mike Owen, Jul 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    680
    Alessandro Zifiglio
    Jul 27, 2006
  4. Gary D. Rezek

    data entry validation

    Gary D. Rezek, Apr 8, 2004, in forum: ASP General
    Replies:
    0
    Views:
    102
    Gary D. Rezek
    Apr 8, 2004
  5. Noozer
    Replies:
    2
    Views:
    240
    Dr John Stockton
    Aug 1, 2005
Loading...

Share This Page