Real-time validation works but only for the validation types you can select in App Connect.
For checking a DB record it happens as per the steps you set out in the server side validation. As for messaging, that should work no worries when the submit the form, check this post for some detailed info: