I have created a VSTS task with certain inputs. One of which is supposed to accept only comma separated email address. If it is was a simple email field I could validate like below:
{
"name": "urlField",
"type": "string",
"label": "URL",
"defaultValue": "",
"required": true,
"helpMarkDown": "Specify URL.",
"validation": {
"expression": "isUrl(value)",
"message": "InvalidURL"
}
},
I refered https://github.com/Microsoft/vsts-tasks/blob/master/docs/taskinputvalidation.md and https://www.npmjs.com/package/json-input-validator. But for my requirement I'd need to specify custom validator method like 'isUrl()'. I want to know where that can be done and how that can be associated to the task or if there is any way to provide regex or split the value here and run method on each section. Any idea is appreciated.