I have a requirement to ask user to type in the URL of the SharePoint List or library and do validation whether that is a valid list or not. The URL could be of other site collection / subsite too. What is the best way to check if its a valid list URL and how to get the list object out of it?
Note: I can use JSOM / REST only (no server side code)
Coming up one idea like this, create 3 input box for users, one to input site/subsite url, second input type, list/libray/folder/ 3rd input list/library/folder name, then you could add logic to check the giving information with Rest API, I think this will be suitable for this use case.