Search Header Logo
Data Validation and Sanitization: Part II

Data Validation and Sanitization: Part II

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

The video tutorial covers two main challenges: improving the user and task models using Mongoose. The first challenge involves adding a password field to the user model, ensuring it is a required string, trimming spaces, and validating it does not contain the word 'password'. The second challenge focuses on the task model, requiring the description to be trimmed and mandatory, while the completed field is optional with a default value of false. The tutorial includes testing these implementations to ensure they work as expected.

Read more

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary goal of the first challenge in the video?

To add a new field to the task model

To improve the user interface

To add a password field to the user model

To remove the email field from the user model

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is storing a plain text password considered insecure?

It can be easily forgotten

It is difficult to implement

It can be easily accessed by unauthorized users

It takes up too much space

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the minimum length requirement for the password field?

8 characters

7 characters

6 characters

5 characters

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to check if the password contains the word 'password'?

search

indexOf

includes

substring

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What should be done if the password contains the word 'password'?

Ignore the input

Throw an error

Convert it to uppercase

Allow it to be saved

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main focus of the second challenge in the video?

Removing the task model

Improving the database performance

Adding a new field to the user model

Customizing the task model

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is required for the task description in the task model?

It should be encrypted

It should be optional

It should be required and trimmed

It should be a number

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?