Skip to content
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

#162414161 validate user's input data #16

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

Luckzman
Copy link
Contributor

@Luckzman Luckzman commented Jan 17, 2019

What does this PR do?

This PR validates users' input during signup

Description of Task to be completed?

It ensures that a user does enter invalid and blank input to our database, and if they try to input say a blank field, they will get a descriptive error message.

How should this be manually tested?

This can be manually tested by pulling the branch and running db:migrate

  • git pull the current repository
  • create databases for user 'User'
  • Switch to ft-signup-validation-#23162414161 branch
  • Run npm install to install all dependencies.
  • Run db:migrate
  • To test the models using mocha run npm test

What are the relevant pivotal tracker stories?

PT Link: https://www.pivotaltracker.com/story/show/162414160

Screenshots

screenshot 2019-01-18 at 11 54 45 pm

@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch 6 times, most recently from 44af1a6 to 54271a1 Compare January 17, 2019 09:28
Maxfurry
Maxfurry previously approved these changes Jan 17, 2019
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 54271a1 to 065f54b Compare January 17, 2019 09:47
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 09:47 Inactive
controllers/authController.js Outdated Show resolved Hide resolved
database/config.js Outdated Show resolved Hide resolved
lib/modelManagers/usermodel.js Outdated Show resolved Hide resolved
middlewares/validators/authValidator.js Outdated Show resolved Hide resolved
middlewares/validators/authValidator.js Outdated Show resolved Hide resolved
middlewares/validators/checkEmail.js Outdated Show resolved Hide resolved
middlewares/validators/checkEmail.js Outdated Show resolved Hide resolved
middlewares/validators/checkEmail.js Outdated Show resolved Hide resolved
routes/api/auth.js Outdated Show resolved Hide resolved
routes/api/index.js Outdated Show resolved Hide resolved
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 065f54b to c2d63ec Compare January 17, 2019 13:06
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 13:06 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from c2d63ec to a87c7e9 Compare January 17, 2019 13:44
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 13:45 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from a87c7e9 to 7a13acd Compare January 17, 2019 17:56
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 17:56 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 7a13acd to 7562a4d Compare January 17, 2019 18:00
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 18:00 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 7562a4d to 90191f2 Compare January 17, 2019 18:04
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 17, 2019 18:04 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 90191f2 to 6102825 Compare January 18, 2019 09:14
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 09:14 Inactive
Copy link
Contributor

@codrex codrex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff.

Attend to the comments

test/checkEmail.test.js Outdated Show resolved Hide resolved
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 6102825 to d13ba4a Compare January 18, 2019 18:10
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 18:10 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from d13ba4a to 99d4125 Compare January 18, 2019 19:04
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 19:04 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 99d4125 to 3134feb Compare January 18, 2019 19:13
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 19:13 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 3134feb to 5b51d9d Compare January 18, 2019 21:56
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 21:56 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 5b51d9d to cedf8d2 Compare January 18, 2019 22:43
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 18, 2019 22:43 Inactive
lib/utils/signupValidator.js Outdated Show resolved Hide resolved
lib/utils/signupValidator.js Outdated Show resolved Hide resolved
lib/utils/signupValidator.js Outdated Show resolved Hide resolved
middlewares/checkEmail.js Outdated Show resolved Hide resolved
test/checkEmail.test.js Outdated Show resolved Hide resolved
test/checkEmail.test.js Outdated Show resolved Hide resolved
test/signupValidator.test.js Outdated Show resolved Hide resolved
lib/utils/validate.js Show resolved Hide resolved
lib/utils/signupValidator.js Outdated Show resolved Hide resolved
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from cedf8d2 to 54caa06 Compare January 21, 2019 12:17
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 21, 2019 12:17 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from 54caa06 to ca40b1d Compare January 21, 2019 15:46
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 21, 2019 15:46 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from ca40b1d to ca95d9c Compare January 21, 2019 15:57
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 21, 2019 15:57 Inactive
@Luckzman Luckzman force-pushed the ft-signup-validation-#162414161 branch from ca95d9c to dd3c79b Compare January 21, 2019 16:43
@Maxfurry Maxfurry temporarily deployed to krypton-ah-stage-pr-16 January 21, 2019 16:44 Inactive
sinon.stub(res, 'status').returnsThis();
// sinon.stub(sendVerificationMail, 'sendVerificationMail');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dead code

@codrex codrex merged commit 02cf423 into develop Jan 22, 2019
@codrex codrex deleted the ft-signup-validation-#162414161 branch January 22, 2019 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants