Need to limit to 10 digit number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 07:01 PM
I need to limit the field to 10 digit number. Here is my code. need assistance.
Thanks.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 10:01 PM
As Ankur mentions, the Validation Regex is the way to go AND I'd also use the "max_length" Variable attribute to limit them to 10 characters in the first place:
Setup the validation regex:
...and then setup your variable:
No coding. Easy to use elsewhere. Because you just know you will need it again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2022 10:05 PM
Oh, and I'm sure the guys sending you code back would have appreciated it if you had actually pasted the code that you had tried instead of the screenshot.
Screenshots are good to show the configuration of things, but when it comes time for help with code...