Click to See Complete Forum and Search --> : Range Validator String Validation [RESOLVED]
pavan
Oct 5th, 2004, 07:47 AM
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
axion_sa
Oct 5th, 2004, 12:43 PM
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,}
pavan
Oct 6th, 2004, 02:10 AM
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 {.}
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.