REG EXPRESSION

K

Ken

How can I insert into validationExpression for "any word within 50 any
character long"?
 
G

Guest

Strange enough, it wasn't working .
It seems working with "\w{0,50}" now.

if you need to validate a text in the TextBox control then you can
simply use the maxlength property
 
K

Ken

well,
I used RegularExpressionValidator within EditItemTemplate in the formview.
when I tried to update without changing the value for the
"ControlToValidate" for that RegularExpressionValidator, it shows the
errorMessage even though this is valid.


Ken said:
Strange enough, it wasn't working .
It seems working with "\w{0,50}" now.

Thanks.



Anon User said:
How can I insert into validationExpression for "any word within 50 any
character long"?

.{50}

more info
here:http://msdn2.microsoft.com/en-us/library/ae5bf541(VS.80).aspx

if space is not allowed then use

\w{50}

it would match any word character including underscore [A-Za-z0-9_]
 
G

Guest

well,
I used RegularExpressionValidator within EditItemTemplate in the formview.
when I tried to update without changing the value for the
"ControlToValidate" for that RegularExpressionValidator, it shows the
errorMessage even though this is valid.

Do you mean that "\w{0,50}" is not working, or what?
 

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,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top