Results 1 to 3 of 3

Thread: Range Validator String Validation [RESOLVED]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    134

    Resolved Range Validator String Validation [RESOLVED]

    Hi all,

    I want to know how to set the min and max values of the range validator control if, the control to validate should have only alphabets and not integers or special chars. I know tha the type should be set to string but what to set in the min and max values.

    Thanx in Advance
    Last edited by pavan; Oct 8th, 2004 at 07:06 AM.
    Pavan Kumar

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    What's wrong with a regular expression validator?
    Expression for an expression that only accepts characters (case insensitive), with at least one character entered, would be:
    [a-zA-Z]{1,}

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Location
    India
    Posts
    134

    Resolved

    Originally posted by axion_sa
    What's wrong with a regular expression validator?
    Expression for an expression that only accepts characters (case insensitive), with at least one character entered, would be:
    [a-zA-Z]{1,}
    Well I dont want a regualr expression. All I want is to restrict the user in entering numberics or special characters. Let us say,...... I want the user to enter his name. Name will always be a string of characters / Alphabets to be quite precise. So I want to retrict the user entry from [a-z] or [A-Z] viz., Alphabets in both Upper/Lower case. That is why precisely I have gone for RangeValidator. In regular expression it checks for at least one character I dont need that I need all should be characters (Of Course {space} and {. } should only be allowed.

    Edit: I've got the answer to allow ./{sapce} and only characters to be entered into a control attache a Regular Expression Validator to the Control and then in the validation expression give \b[a-zA-Z .]+\b. Donot forget the '+'. this will include all the characters from 'a to z' and from [/B]'A to Z'[/B] along with {space} and {.}
    Last edited by pavan; Oct 8th, 2004 at 07:05 AM.
    Pavan Kumar

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