With the PreSaveAction function we can perform our custom validations on the client side before committing data to the SharePoint.
In this function we must return either true or false according whether we want proceed with save or not.
But what if our validations are asynchronous? with JSOM and REST you always work asynchronously. How can I return true or false based on my asynchronous checks?
As far as I know, we only have workarounds:
Workaround 1: asynch=false ... is deprecated
Workaround 2: trick the onclick handler ... replace the handler with a custom function and then execute the original handler as a callback ...
Do you know any fully JSOM/REST solution?