-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created a check that determines if the CSV has the minimum required info #3
base: main
Are you sure you want to change the base?
Conversation
It specifies where the problematic lines are in the CSV file. Option to return false immediately even if one line is wrong. But its been commented out
NEVER MIND. I DIDN'T DO A CHECK TO SEE IF THE EMAIL IS IN THE RIGHT FORMAT |
2 MINUTES |
Haha, we are in no rush here. |
checks if email is of the form [email protected] Alternate option which checks if email is of form [email protected] has been commented out also, slightly modified csv_check so that it doesn't only catch empty strings, but also strings ONLY composed of whitespaces
I've added a function is_invalid_email. Which checks if every mail is of the format [email protected] . the csv_check function checks if the email is valid using is_invalid email and makes sure that the organization and contact name have at least one character. So, they can't be empty or have ONLY blank spaces. |
This is based on the assumption that the Organization, Contact_Name and Contact_Email are the only essential requirements, and Cascadia and Prev_Sponsor are optional. If that isn't the case, I can easily modify it. Now that I think about it, I should have asked for clarifications super early on. Sorry if what I wrote wasn't what you were looking for 😅 |
You are correct about the required and not fields. So no problem there. If you made them "required" this would be no problem either, anyway. |
Okay, so reviewed it. I think the rest is good, though. So once done, I'll pull this version and test. |
Now, it doesn't check whether the email is of the seagl format, But rather if it is in an email format (i.e [email protected])
I updated the is_invalid_email function. It now checks if email is of the format ' [email protected] ' where: |
Running the csvCheck() function specifies where the problematic lines are in the CSV file. It returns a boolean.
Option to return false immediately even if one line is wrong, but its been commented out. So right now it goes through every line, and prints which lines are problematic.
Hope this is alright