@mikezimm/fps-core-v7
Version:
Library of reusable core interfaces, types and constants migrated from fps-library-v2
13 lines • 638 B
JavaScript
import { _LinkIsValid } from "./_LinkIsValid";
export async function validateDocumentationUrl(thisProps, propertyPath, newValue) {
if (propertyPath === 'documentationLinkUrl' || propertyPath === 'fpsImportProps') {
thisProps.documentationIsValid = await _LinkIsValid(newValue) === "" ? true : false;
console.log(`${newValue ? newValue : 'Empty'} Docs Link ${thisProps.documentationIsValid === true ? ' IS ' : ' IS NOT '} Valid `);
}
else {
if (!thisProps.documentationIsValid) {
thisProps.documentationIsValid = false;
}
}
}
//# sourceMappingURL=ValidateLinks.js.map