input: Write a Python function to validate if an email is in the correct format using regular expressions.
  assert validate_email("test@example.com") == {'email': 'test@example.com', 'valid': True}
  assert validate_email("invalid-email") == {'email': 'invalid-email', 'valid': False}
  assert validate_email("user.name+tag+sorting@example.com") == {'email': 'user.name+tag+sorting@example.com', 'valid': True}
output: def validate_email(email):
      import re
      pattern = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
      if re.match(pattern, email):
          return {'email': email, 'valid': True}
      else:
          return {'email': email, 'valid': False}