input: Write a python function to validate email addresses using regular expressions.
  assert validate_email('user@example.com') == 1
  assert validate_email('user@invalid') == 0
  assert validate_email('valid.email@domain.com') == 1
  assert validate_email('invalid-email') == 0
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 1
      return 0