Regular Expression Validation - spaces problem

  • Thread starter Thread starter Nazir
  • Start date Start date
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
 
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
 
Back
Top