I need to be able to call an external web service to validate data being entered on a contact record before it is saved, and prevent the record being saved and display an error message to the user if that validation fails.
The best I've managed to find so far is to call an Apex trigger when the contact is modified, but as far as I understand it this runs asynchronously, so the contact would still be saved and any error message wouldn't be immediately obvious to the user.
Is what I'm trying to achieve possible?