diff --git a/content/02-Primitive-Types/09-Combining-Types/instructions.mdx b/content/02-Primitive-Types/09-Combining-Types/instructions.mdx index 4a4cbf0..d97b7fb 100644 --- a/content/02-Primitive-Types/09-Combining-Types/instructions.mdx +++ b/content/02-Primitive-Types/09-Combining-Types/instructions.mdx @@ -6,7 +6,7 @@ keywords: "types, combining types, boolean, null, JSON Schema" # Combining Types - Boolean and Null -In out previous examples, we have set the types of properties as `string` and `integer`. But **what if you want to combine different types for a single property?** +In our previous examples, we have set the types of properties as `string` and `integer`. But **what if you want to combine different types for a single property?** Let's add a new property `hasAgreedToTerms` to the JSON object. This property should be a `boolean` value, but it can also be `null`. @@ -51,4 +51,4 @@ In JSON Schema, you can define multiple types by passing **an array of types** t -Now, try to modify the `hasAgreedToTerms` property on the to accept both `boolean` and `null` values. \ No newline at end of file +Now, try to modify the `hasAgreedToTerms` property on the to accept both `boolean` and `null` values. diff --git a/content/03-Objects/04-Applying-Schema-to-Property-Names/instructions.mdx b/content/03-Objects/04-Applying-Schema-to-Property-Names/instructions.mdx index 6d10dc7..9857a4e 100644 --- a/content/03-Objects/04-Applying-Schema-to-Property-Names/instructions.mdx +++ b/content/03-Objects/04-Applying-Schema-to-Property-Names/instructions.mdx @@ -24,7 +24,7 @@ We want to ensure that each property names are written in capital letters. We ca } ``` -You are given an empty object schema in the . Modify it ensure that it follows the below constraints: +You are given an empty object schema in the . Modify it to ensure that it follows the below constraints: 1. The object should have at **least 2 properties**. 2. The **property names** should be written **in capital letters**, and should have **minimum length of 3 characters**. @@ -33,4 +33,4 @@ You are given an empty object schema in the . Modify it ensure > **Hints:** > - For the first constraint, you can use the `minProperties` keyword. > - For the second constraint, you can use the `propertyNames` keyword with the `pattern` keyword. -> - For the third constraint, you can use the `additionalProperties` keyword with the `type` keyword. \ No newline at end of file +> - For the third constraint, you can use the `additionalProperties` keyword with the `type` keyword. diff --git a/content/04-Arrays/03-Tuple-Validation/instructions.mdx b/content/04-Arrays/03-Tuple-Validation/instructions.mdx index ab2b6f5..311be15 100644 --- a/content/04-Arrays/03-Tuple-Validation/instructions.mdx +++ b/content/04-Arrays/03-Tuple-Validation/instructions.mdx @@ -18,7 +18,7 @@ We want to display the address of a person. The address is represented as an arr } ``` -each element of the `address` array have constraints of their own: +each element of the `address` array has constraints of its own: - `number` should be an integer - `street_name` should be a string diff --git a/content/04-Arrays/06-Ensuring-Array-Content-With-Contains/instructions.mdx b/content/04-Arrays/06-Ensuring-Array-Content-With-Contains/instructions.mdx index 4bc9ab0..c5deca4 100644 --- a/content/04-Arrays/06-Ensuring-Array-Content-With-Contains/instructions.mdx +++ b/content/04-Arrays/06-Ensuring-Array-Content-With-Contains/instructions.mdx @@ -1,10 +1,10 @@ --- -title: Ensuring Array Content with the 'contains' +title: Ensuring Array Content with the 'contains' keyword description: "Learn how to use the 'contains' keyword in JSON Schema to validate arrays, ensuring they contain specific elements like numbers or strings, with examples and tasks." keywords: "array, contains, validation, JSON Schema, subschema, keyword, example, task, skills, const" --- -# Ensuring Array Content with the 'contains' +# Ensuring Array Content with the 'contains' keyword The `contains` keyword is used to ensure that an array contains **at least one element** that matches the [subschema](https://json-schema.org/learn/glossary#subschema) defined in the `contains` [keyword](https://json-schema.org/learn/glossary#keyword). @@ -35,4 +35,4 @@ Our employee document has a field called `skills`. Now, we want to ensure that the `skills` array contains at least one element that is equal to `"JavaScript"`. modify the schema given to you in the to apply this constrain. -> **Hint:** Use the `const` keyword to specify JavaScript as the required element. \ No newline at end of file +> **Hint:** Use the `const` keyword to specify JavaScript as the required element. diff --git a/content/04-Arrays/07-minContains-and-maxContains/instructions.mdx b/content/04-Arrays/07-minContains-and-maxContains/instructions.mdx index cf3710a..2407d12 100644 --- a/content/04-Arrays/07-minContains-and-maxContains/instructions.mdx +++ b/content/04-Arrays/07-minContains-and-maxContains/instructions.mdx @@ -40,6 +40,6 @@ The following example demonstrates how to use the `minContains` and `maxContains } ``` -Our employee has field called worked hours. We want to ensure that the `workedHours` array contains **at least 2 elements** that are **greater than or equal to 8 and less than or equal 12**. Modify the schema given to you in the to apply this constraint. +Our employee has a field called worked hours. We want to ensure that the `workedHours` array contains **at least 2 elements** that are **greater than or equal to 8 and less than or equal 12**. Modify the schema given to you in the to apply this constraint. diff --git a/content/05-Conditional-Validation/01-Ensuring-Conditional-Property-Presence/instructions.mdx b/content/05-Conditional-Validation/01-Ensuring-Conditional-Property-Presence/instructions.mdx index 16930d1..ab56724 100644 --- a/content/05-Conditional-Validation/01-Ensuring-Conditional-Property-Presence/instructions.mdx +++ b/content/05-Conditional-Validation/01-Ensuring-Conditional-Property-Presence/instructions.mdx @@ -6,7 +6,7 @@ keywords: "dependentRequired, conditional validation, JSON Schema, dependentSche # Conditional Validation -Congratulations! You have made so far. We will learn about conditional validation in module +Congratulations! You have made it so far. We will learn about conditional validation in this module ## What is Conditional Validation? @@ -65,4 +65,4 @@ The value of the `dependentRequired` keyword is an object. Each entry in the obj } ``` -You are given a *Schema* for the above JSON document in the . Update the schema to make sure that if the `creditCardNumber` property is present, then the `address` property must also be present. \ No newline at end of file +You are given a *Schema* for the above JSON document in the . Update the schema to make sure that if the `creditCardNumber` property is present, then the `address` property must also be present.