I'm working on a workflow, where the users have to input an array of IP addresses. The validation takes place in the user presentation, via Custom Validation, where the input IP address array is called and an action with the following code is executed:
var re = new RegExp("^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$"); for each (IP in IPAdresses){ System.log("Checking IP: " + IP); if (!IP.match(re)) { return "IP " + IP + " incorrect" } else { return null } }
This works for a single input, with an array, only the top element (the last inserted) is checked in the user presentation. How should I modify the action, so that all input values are validated?
Thanks in advance...