I have an app where people scan orders in and we pull all the details, they then confirm and correct details that scanned incorrectly.
One field is price, what the client is starting to do is enter invalid prices, for example today they entered “.” And that’s it, which crashes a back end app that converts the xml to EDI and sends it to the supplier.
I would like to put in some checks that will do something like a pattern match.
If they enter a value other then “*#*” or “*#.#*” or “*#*,#*.#*”
Is there a quick function in JavaScript that I can pop in my “Format” and the field and get a true/false value returned on if it matches the pattern or not.
Thanks
One field is price, what the client is starting to do is enter invalid prices, for example today they entered “.” And that’s it, which crashes a back end app that converts the xml to EDI and sends it to the supplier.
I would like to put in some checks that will do something like a pattern match.
If they enter a value other then “*#*” or “*#.#*” or “*#*,#*.#*”
Is there a quick function in JavaScript that I can pop in my “Format” and the field and get a true/false value returned on if it matches the pattern or not.
Thanks
Comment