I have a string of data which will often read like this: “0010, 0010, 0030”. I need to validate that string to the user by setting up an alert if all of the numbers do not match. So if the string looks like this “0010, 0010, 0010” then there is no issue and my logic proceeds as planned. But if it looks like this: “0010, 0010, 0030”, then I need to alert the user that they chose an incorrect operation (where 0010, and 0030 are operations in the logic), and they must reselect. Any ideas?
Share
Just split the string on
,and then compare the entries.Something like the following (I haven’t tested this, but its an outline)
Here is a fiddle.