Don't Allow Submit With Invalid Field Input
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2018 08:35 AM
I am using the showFieldMsg function to validate a MAC address field and it works great. However, I don't want them to be able to submit if it is invalid and I would prefer not to clear the user input out of the required field to make this happen (it would be annoying to retype an entire MAC because you used hyphens instead of colons or had a lowercase letter).
I have attached my script image. I've thought about adding a hidden "valid_mac" field that is required and empty unless a valid MAC is entered but that also seems clunky. I'm also new to scripting so I'm not certain on how to implement that if it turns out to be the only/best way to handle this.
Labels:
- Labels:
-
Scripting and Coding