Results 1 to 5 of 5

Thread: RegularExpressionValidator help with not allowing null or spaces [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Minnesota
    Posts
    830

    RegularExpressionValidator help with not allowing null or spaces [RESOLVED]

    I am using the RegularExpressionValidator control and I have a form element that I want to allow numbers or a period is all. I believe I have the syntex right with

    VB Code:
    1. <asp:RegularExpressionValidator ControlToValidate="txtRetail" ErrorMessage="Retail" Text="Example:....." runat="server" ValidationExpression="^[0-9]{1,6}\.{0,}[0-9]{0,2}$" />

    Works except if I put no value it gets by. I tried ^\S|.... but that didn't work.

    Any ideas?

    Thanks in advance.
    Last edited by lleemon; May 4th, 2004 at 10:26 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width