added input validation for name (cannot exceed 50 chars) and for email address (must be valid format)