Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Technology & Integration
Check whether a string contains no letters
Community
›
Forums
›
Technology & Integration
Check whether a string contains no letters
New Post
New Post
Marios Andreas Tofarides
Posted on 2014-03-10
Marios Andreas Tofarides
Rank: #7028
Posted on 2014-03-10
I have a field whose values has to be like "1,2,3,4". I want to make sure that no letters or other characters besides numbers (0-9) and comma (,) are entered.
I have used Regex_search with "(\d+)(,\s*\d+)*" regular expression, but since Regex_search doesn't do a complete match, entries like "1,2,a,4;7" are accepted and saved into the database.
Any suggestions?
Regards,
Nuno Palhinhas
Posted on 2014-03-10
Nuno Palhinhas
Rank: #6449
Posted on 2014-03-10
Solution
Hi,
Did you included the beginning and end of string chars (^ ... $)?
Like this:
^
(\d+)(,\s*\d+)*
$
It should work with these.
Nuno
Solution
André Vieira
Posted on 2014-03-10
André Vieira
Rank: #1
Posted on 2014-03-10
Solution
If you get this from the user's input you might want to consider having an input mask on your input.
There's a forge component for this
.
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...