Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Custom Validator

Reply
Thread Tools

Custom Validator

 
 
Sunil Sabir
Guest
Posts: n/a
 
      06-29-2004
Dear All,

I want to use a Custom Validator which checks two things.Firstly that
the user should only enter letters.Secondly, The text box should not
be empty when the submit button is clicked. I know that I can do this
by required field validator. But I want to do two things using one
control. I have done the first part which only checks that the user
has entered only letters.But cant figure out how to do the second part.
which is(text box should not be empty when the submit button is
clicked)

Any help much appreciated.

cheers,
Sunil Sabir
 
Reply With Quote
 
 
 
 
Jacques Leclerc
Guest
Posts: n/a
 
      06-30-2004
What you want to do can be accomplished using the regular expression
validator.

The regular expression to use: ^[a-zA-Z]+$


Hope this helps.

Jacques Leclerc

"Sunil Sabir" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Dear All,
>
> I want to use a Custom Validator which checks two things.Firstly

that
> the user should only enter letters.Secondly, The text box should

not
> be empty when the submit button is clicked. I know that I can do

this
> by required field validator. But I want to do two things using one
> control. I have done the first part which only checks that the

user
> has entered only letters.But cant figure out how to do the second

part.
> which is(text box should not be empty when the submit button is
> clicked)
>
> Any help much appreciated.
>
> cheers,
> Sunil Sabir



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Struts Validator - creditCard validator smrimell@gmail.com Java 4 02-13-2007 08:32 PM
How to get custom control to work with custom validator Scott Yenor ASP .Net Web Controls 0 01-27-2004 12:37 AM
Custom Validator Issue Arvind P Rangan ASP .Net 1 11-12-2003 03:28 PM
custom validator Mike P ASP .Net 2 11-05-2003 03:25 PM
Custom Validator Serdar Kalaycę ASP .Net 1 07-08-2003 01:36 PM



Advertisments