Instead of having the system validate it, leave it on the content editor/owner. If the content editor/owner is technical enough to be entering ID's, they should have an idea on how to look for duplicates when they add the widgets to the page. Secondly, you could add a prefix to the widget and prefix the ID with this to help it be more unique and possibly create a "grouping" of controls with that prefix.