validate Multiline text box

  • Thread starter ashwin kumar via .NET 247
  • Start date
A

ashwin kumar via .NET 247

i have a multiline text box and would like to restrict its maximum size to 200. i am using a regular expression ^(.|\\n){1,512}$.This expression validates includes spaces.Is there any regExp which can validate text box excluding spaces for given length.
 
M

Mythran

You could just use the MAXLENGTH attribute, could you not?

Mythran


ashwin kumar via .NET 247 said:
i have a multiline text box and would like to restrict its maximum size to 200.
i am using a regular expression ^(.|\\n){1,512}$.This expression validates
includes spaces.Is there any regExp which can validate text box excluding spaces
for given length.
 
S

Swap

Hi,
But it is not working with multiline textbox means textarea if you have any
other idea except javascript then tell us i am interested in it.

Mythran said:
You could just use the MAXLENGTH attribute, could you not?

Mythran


ashwin kumar via .NET 247 said:
i have a multiline text box and would like to restrict its maximum size
to 200.
i am using a regular expression ^(.|\\n){1,512}$.This expression validates
includes spaces.Is there any regExp which can validate text box excluding spaces
for given length.
 
M

Mythran

Haven't tested it...but here is one :)

^([^ ]|\n){1,512}$

Mythran


Swap said:
Hi,
But it is not working with multiline textbox means textarea if you have any
other idea except javascript then tell us i am interested in it.

Mythran said:
You could just use the MAXLENGTH attribute, could you not?

Mythran


ashwin kumar via .NET 247 said:
i have a multiline text box and would like to restrict its maximum size
to 200.
i am using a regular expression ^(.|\\n){1,512}$.This expression validates
includes spaces.Is there any regExp which can validate text box excluding spaces
for given length.
 

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,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top