systers / macc

Server side support platform for Peace Corps mobile applications.
http://macc.systers.org/
9 stars 51 forks source link

No check on email and phone number validation in the sign up process #232

Closed HarinderKaur11 closed 7 years ago

HarinderKaur11 commented 7 years ago

In the sign-up form even if the user enters an invalid phone number with more or less digits, he is successfully registered as a new user( although by clicking on the submit button he is directed to some other page with some error message). There should be a check on a valid phone number. (Also, there is no verification email send to the email address entered, there should be a check on valid email as well). If this issue has not being addressed yet, shall I start working on these two concern areas?

screenshot 3 screenshot 5 screenshot 6

mish24 commented 7 years ago

@HarinderGithub Please go through the list of open and closed issues to see whether the issue you're opening exists or not. There have been issues raised related to email and phone number validations. Maybe comment there to take up the work?

GunpreetAhuja commented 7 years ago

@mish24 there have been different issues related to validations. This is a different one in case of phone number validation. As for the email validation, the only validation applied is for '@' and '.'. I believe she wants to apply validation to check for the domain name correctness and email existence.

HarinderKaur11 commented 7 years ago

@mish24 I have gone through the list of all the open and closed issues, but I didn't find any previous issue serving this purpose. If you find a similar issue please reference it here.

mish24 commented 7 years ago

@HarinderGithub Ah integrating third party apps for the validations you mean? To check whether the email you entered is real or not correct? I'm sorry, I thought the issue was related to manual validations. @medhach can guide you for this well

HarinderKaur11 commented 7 years ago

@mish24 yes, to check whether the email and the phone number entered are valid or not.

mish24 commented 7 years ago

@HarinderGithub This will need a new field like 'Country' of the user too to validate whether the number provided belongs to that country or not. And adding a new field isn't possible in this version of Django. Email, I think it can be done and it's really good.

HarinderKaur11 commented 7 years ago

@mish24 can you please elaborate why adding a new field is not possible? And in that case we already have the location field, can't we use it as a country field?

HarinderKaur11 commented 7 years ago

@medhach can you please guide on this issue?

amittbhardwj commented 7 years ago

@mish24 For email validation, we can use django-allauth app which have facility to send a token to verify email. I hope it will solve this issue raised and for phone number validation we can use the solution mentioned in this link http://stackoverflow.com/questions/19130942/whats-the-best-way-to-store-phone-number-in-django-models . It is very basic change.

medhach commented 7 years ago

@amittbhardwj Since this is a little bigger than a simple UI change, I would suggest to add this as a GSoC task. :)