Regular Expression Validation - spaces problem

N

Nazir

Hi

I'm using a regular expression validator, but if spaces are entered,
it bypasses the validation!

I'm using

^[0-9a-zA-Z]{5,100}$

[alpha-numeric characters between 5-100 in length.]

I was using a required filed validator beforehand, which wouldn't let
you get waay with spaces.

Can anyone advise?

Thanks

NJ
 
M

Munsifali Rashid

Field validators only fire when there is content in the field being
validated. To check that a field has data, and correct date, you need to
use two validators. The required field validator will ensure that data is
entered, and your second validator (eg. regular expression validator) will
ensure that the data entered is in the required format.

Hope this helps,

Mun
 

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

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,851
Latest member
CliftonCor

Latest Threads

Top