Custom Validator

S

Sunil Sabir

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
 
J

Jacques Leclerc

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top