validation of users before editing and deleting