Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
validation regex to check for space presence
xsrinivasank
I have a requirement wherein in one of the fields no space should be entered at all(no leading or trailing or space in the middle).
Can someone send me a validation regex for this.
I do not want to do this thru form api
Find more posts tagged with
Comments
Adam Stoller
I think you might be able to do something like:
validation-regex="^[^ ]+$"
Thats:
^
(circumflex / shift-6) Anchored at the beginning of the string
[^ ]
(open-square-bracket+circumflex+space+close-square-bracket) Non-space characters
+
(plus) One-or-more (use '
*
' (asterisk / shift-8) if you want to have Zero-or-more)
$
(dollar-sign) Anchored at the end of the string
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com