I have been able to create a user to user messaging using the wix database. but now my issue is

I have been able to create a user to user messaging using the wix database instead of the wix inbuilt wixchat that shows on all pages if switched on. We needed a full window chat page that can only be triggered when a user opens another user’s profile, and we have been able to do it using the database. Our issue now is that, because we wanted to be in control of the messages that users exchange to avoid violation of our terms & conditions the entire procedure is becoming so big and for that matter our question here is, is there anyway or any code to valid user’s input and prohibit the use of emails, contact numbers, images, and etc??? Lets, do this together,

Thanks