Check whether a string contains no letters

Check whether a string contains no letters

  
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,

 
Hi,

Did you included the beginning and end of string chars (^ ... $)?
Like this: ^(\d+)(,\s*\d+)*$
It should work with these.

Nuno
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.