Open adbharadwaj opened 6 years ago
I would like to work on this issue.
@bruce-wayne99 👍
Let us know if you have any questions.
@adbharadwaj I think there are two ways to handle this issue. We can use built-in email validators of django (or) Write our own util function using regular expressions for the server side validation.
@abharadwaj, I thought that the consensus we had reached in our internal discussions in our group at Virginia Tech was to send email to the user in order to validate the address, at least at the point of account creation or email update. Am I missing something?
On Sun, Feb 18, 2018 at 6:33 PM, Subramanyam Makam <notifications@github.com
wrote:
@adbharadwaj https://github.com/adbharadwaj I think there are two ways to handle this issue. We can use built-in email validators of django (or) Write our own util function using regular expressions for the server side validation.
- As @mitchwagner https://github.com/mitchwagner suggested in PR for validating email addresses on client side https://github.com/Murali-group/GraphSpace/pull/351 that we should make sure the regexes used on both ends are the same.
- If we handle this issue using method-1 then it would lead to changing the regular expression for the client side email validation to the one used by django shown on the link: https://github.com/django/django/blob/master/django/core/validators.py
- Otherwise we can write our own util function on the server side to validate email addresses using regex similar to the one used in client-side validation.
- I think option-1 is better because I think django might have handled most of the corner cases in it's regular expression which can be seen on the link: https://github.com/django/django/blob/master/django/core/validators.py under EmailValidator class.
- So we can use the built-in django email validator on the server side and modify client-side validation accordingly. Please correct me if I am wrong (or) suggest me if there is a better way to do it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359#issuecomment-366558494, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkWUIi-cLkBLemtJjuCs2PutQ3RlhWSks5tWLNMgaJpZM4SI3kb .
Oh yeah that's true. I have created a separate issue for that.
On Feb 18, 2018 6:46 PM, "T. M. Murali" notifications@github.com wrote:
@abharadwaj, I thought that the consensus we had reached in our internal discussions in our group at Virginia Tech was to send email to the user in order to validate the address, at least at the point of account creation or email update. Am I missing something?
On Sun, Feb 18, 2018 at 6:33 PM, Subramanyam Makam < notifications@github.com
wrote:
@adbharadwaj https://github.com/adbharadwaj I think there are two ways to handle this issue. We can use built-in email validators of django (or) Write our own util function using regular expressions for the server side validation.
- As @mitchwagner https://github.com/mitchwagner suggested in PR for validating email addresses on client side https://github.com/Murali-group/GraphSpace/pull/351 that we should make sure the regexes used on both ends are the same.
- If we handle this issue using method-1 then it would lead to changing the regular expression for the client side email validation to the one used by django shown on the link: https://github.com/django/django/blob/master/django/core/validators.py
- Otherwise we can write our own util function on the server side to validate email addresses using regex similar to the one used in client-side validation.
- I think option-1 is better because I think django might have handled most of the corner cases in it's regular expression which can be seen on the link: https://github.com/django/django/blob/master/django/core/validators.py under EmailValidator class.
- So we can use the built-in django email validator on the server side and modify client-side validation accordingly. Please correct me if I am wrong (or) suggest me if there is a better way to do it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359# issuecomment-366558494, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkWUIi- cLkBLemtJjuCs2PutQ3RlhWSks5tWLNMgaJpZM4SI3kb .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359#issuecomment-366559317, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUeB25ibSc29ndd1d9-vo75NnkK4Nhnks5tWLZCgaJpZM4SI3kb .
Then close this issue and refer to that one?
On Sun, Feb 18, 2018 at 6:53 PM, Aditya Bharadwaj notifications@github.com wrote:
Oh yeah that's true. I have created a separate issue for that.
On Feb 18, 2018 6:46 PM, "T. M. Murali" notifications@github.com wrote:
@abharadwaj, I thought that the consensus we had reached in our internal discussions in our group at Virginia Tech was to send email to the user in order to validate the address, at least at the point of account creation or email update. Am I missing something?
On Sun, Feb 18, 2018 at 6:33 PM, Subramanyam Makam < notifications@github.com
wrote:
@adbharadwaj https://github.com/adbharadwaj I think there are two ways to handle this issue. We can use built-in email validators of django (or) Write our own util function using regular expressions for the server side validation.
- As @mitchwagner https://github.com/mitchwagner suggested in PR for validating email addresses on client side https://github.com/Murali-group/GraphSpace/pull/351 that we should make sure the regexes used on both ends are the same.
- If we handle this issue using method-1 then it would lead to changing the regular expression for the client side email validation to the one used by django shown on the link: https://github.com/django/django/blob/master/django/core/validators.py
- Otherwise we can write our own util function on the server side to validate email addresses using regex similar to the one used in client-side validation.
- I think option-1 is better because I think django might have handled most of the corner cases in it's regular expression which can be seen on the link: https://github.com/django/django/blob/master/django/core/validators.py under EmailValidator class.
- So we can use the built-in django email validator on the server side and modify client-side validation accordingly. Please correct me if I am wrong (or) suggest me if there is a better way to do it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359# issuecomment-366558494, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkWUIi- cLkBLemtJjuCs2PutQ3RlhWSks5tWLNMgaJpZM4SI3kb .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359# issuecomment-366559317, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUeB25ibSc29ndd1d9- vo75NnkK4Nhnks5tWLZCgaJpZM4SI3kb .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Murali-group/GraphSpace/issues/359#issuecomment-366559746, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkWUGy7-P3DlURCC_MJovVuD3SBR_icks5tWLfngaJpZM4SI3kb .
Oh no! I have created two separate issues for server-side email validation which requires two parts. This issue is one of them.
@adbharadwaj I have suggested two methods to solve this issue. Please consider them and suggest me if this issue can be solved in a better way. Thanks!
Currently, we only validate the email addresses on the client side. We would want to validate email values before we save them in the database. If the email address is not valid, we would have to generate a proper error message for the user.
Refer to this PR to find out how we validate email addresses on client side.