Skip to content

Add email validation #5

Description

@schlos

Where to implement the change:
"Morph script" - script that parses TJV register and persists it to db
https://morph.io/SelectSoft/blue_gene

Current:
Sometimes due to human error, processing is not done properly, skipped or stopped, so resulting Morph.io database has invalid records.

Expected:
Add checks in Morph.io scraper in each Email field:

  • email
  • foi_officer_email
  • email_1
  • email_2
  • foi_officer_email_1
  • foi_officer_email_2

See also: https://www.pythoncentral.io/how-to-validate-an-email-address-using-python/

Add email validation

Workflow:

After scraping public TJV register, add a RegEx check in each email field when value is not null (!=null).

Based on result of a RegEx, write to the status field for that processed row:

  • IF all email fields passed the validation, write status: updated
  • IF any of email fields failed the validation, write status: failed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions