# Pastebin ApNUR2ey
validate: function (url, id) {
const isStoreLink = /vimeo\.com\/store\/ondemand/.test(url);
if (isStoreLink) {
return {
error: exp.l(
`Please link to the “{allowed_url_pattern}” page
rather than this “{current_url_pattern}” link.`,
{
allowed_url_pattern: (
{'/ondemand'}
),
current_url_pattern: (
{'/store/ondemand'}
),
},
),
result: false,
target: ERROR_TARGETS.URL,
};
}
switch (id) {
case LINK_TYPES.downloadpurchase.recording:
case LINK_TYPES.downloadpurchase.release:
case LINK_TYPES.streamingpaid.recording:
case LINK_TYPES.streamingpaid.release:
return {result: true};
}
return {result: false, target: ERROR_TARGETS.ENTITY};
},