Hey,
we have a requirement , we need an image url property for survey, but wondering how to add a validation to check if the input is a valid image url like adding regular expression?
I have created an example here :
https://plnkr.co/edit/g40msrI32GZr0myc
I tried this, but seems like adding validation here is not working
CodeSurvey.Serializer.addProperty("survey", {
name: "imageURL:text",
displayName: "imageURL",
category:"general",
validators: [
{
type: "regex",
text: LocalizedStrings.CorrectURL,
regex: "[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"
}
]
})
can you help, thanks