The below link exactly answers your requirement -
Its a little old post but the fundamental idea driving the programming logic for your requirement can be driven from here.
You can try to take help of Powershell extension for -
i will have to attach the "query:/" string before every datasouce location in every rendering and we have a lot of renderings.
You can probably make use of method described at -
If you have multi-site. Check your site definition defined, in this case, Sitecore appends Sc_site = website in URL, which causes this issue as per my experience.
The workaround is when you see sc_website= website, remove it manually and check the response.
Hey try to go to the experience editor from the admin home instead of from sitecore content editor or desktop.
Sitecore will save the last mode that you used so after you use one time in shared mode and use experience editor from content editor it will continue in shared mode and also you probably can't change there, only if you again go to experience ...
I think I figured it out! Sitecore is merging messages with the same text, so making the message unique to the validation failure fixes the error. Originally I was setting the error message text as follows in the parameters section of the validator item:
Instead of doing this, I am now setting the message within the custom validator itself as follows: