By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,058 Members | 1,217 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,058 IT Pros & Developers. It's quick & easy.

Regular Expression Validation - spaces problem

P: n/a
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
Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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


"Nazir" <na***********@yahoo.co.uk> wrote in message
news:9e************************@posting.google.com ...
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

Nov 17 '05 #2

P: n/a
Thanks Mun - that did the trick.

NH
"Munsifali Rashid" <mun@**RemoveToReply**vefuk.com> wrote in message news:<eH**************@TK2MSFTNGP09.phx.gbl>...
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

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.