add front end validations for messages and upload image files