-
Notifications
You must be signed in to change notification settings - Fork 4
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
#162948989 Descriptive Registration validation errors #11
Conversation
Hey @Hesbon5600 keep up the good spirit... however on your PR in the steps to follow when testing add an option to install virtualenv for the application and how to activate it on both OS |
The error messages are descriptive. Good work. |
Okay @edhmik I'll do that |
7ef37e9
to
e03fec0
Compare
e03fec0
to
0a0164f
Compare
min_length=8, | ||
write_only=True | ||
max_length=128, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hesbon5600 128 is alot, reset this to 30 max characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay sure
# The username must be: unique, at least 5 characters long | ||
# There should not be any space in the username | ||
# Underscores and hyphens are also allowed in the username | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least 5? I thought in the implementation you used 8..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think It should just be '# The username must be: unique'. Let me fix that.
The password is the one that must be at least 8 characters
0a0164f
to
2833880
Compare
2833880
to
93b0b6f
Compare
- Email must be valid and unique - Password must be alphanumeric - Password must have an uppercase and lowercase letter - Password must be at least 8 characters long - Username must be unique [Delivers #162948989]
93b0b6f
to
286c278
Compare
What does this PR do?
- Email must be valid and unique
- Password must be alphanumeric
- Password must have an uppercase and lowercase letter
- Password must be at least 8 characters long
- Username must be unique
How should this be manually tested?
prerequisites:
Have postgres installed and running on localhost.
Follow the following steps:
Clone this repo with the following command:
https://github.com/andela/ah-fulldeck.git
Cd into the ah-fulldeck directory:
cd ah-fulldeck
Checkout to the branch
ft-validate-signup-162948989
with the command:git checkout ft-validate-signup-162948989
Install the requirements by running the command:
pip install requirements.txt
Create a database:
create database fulldeck
Export the environment settings as follows:
export DATABASE="fulldeck"
export USER="your postgres username "
export HOST="localhost"
export PASSWORD="your postgres password"
Migrate the models to the db:
python manage.py migrate
Run the server:
python manage.py runserver
From postman:
Create a user by sending a post request to the '/api/user/' end point with the data body
{
"user": {
"username" :"prefered name",
"email": "your email",
"password": "password"
}
}
You can change the format of the email or password.
Invalid email and password will result in a response message outlinging the fault.
An existing username or email will also throw an error message
Any background context you want to provide?
None
What are the relevant pivotal tracker stories?
#162948989
Screenshots
2. Invalid email format
3. Password without a number or letter