Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Restrict lenght of Textarea in WF
rajnag
I got error when i am trying to restrict the length of Textarea. I tried like this. Is any another way to do.
<textarea rows="3" cols="41" validation-regex="^.{1,120}$" />
Find more posts tagged with
Comments
rajnag
I got it.
valid_input => '$_ =~ /^.{1,120}$/',
Migrateduser
Be careful. By default, . does not match a newline in perl, so you either need to use the /s modifier on your regex, or use a regex like this:
^[\w\W]{1,120}$
That is, match the beginning of the string followed by 1 to 120 whitespace or non-whitespace characters, followed by the end of the string.