
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-19-2015 06:55 AM
I have a field on a catalog form. The field is requesting the last four digits of the SSN # or Personal ID #. Today the field is setup as a single line text field, but I want to do the following:
a) make the field size = 4
b) I only want to allow that field to have numeric characters
I want to ensure that when I shorten the field size that I am only shortening it for this variable.
Thanks,
Karen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2015 07:50 AM
My apologies. Try changing it to /^[0-9][0-9][0-9][0-9]$/ inside the quotes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2015 11:32 AM
That's what I was trying to do in my first response, but I lack tons of experience with regex. Thanks, Greg!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2015 09:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2015 01:31 AM
Hi Karen,
If you could show us how your code looks like that tests this field that would help.
Cheers
Greg

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2015 05:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2015 06:24 AM
Hi Karen,
Remove forward slashes from RegExp.
Do this:
var check = new RegExp("^[0-9][0-9][0-9][0-9]$");
That should yield correct true/false results of your regex tests.
Cheers
Greg