diff --git a/content/05-Conditional-Validation/04-if-then-else/code.ts b/content/05-Conditional-Validation/04-if-then-else/code.ts index ef6c04c..dba2bf7 100644 --- a/content/05-Conditional-Validation/04-if-then-else/code.ts +++ b/content/05-Conditional-Validation/04-if-then-else/code.ts @@ -17,7 +17,7 @@ const code: any = { }, }, - required: ["name"], + required: ["name", "isStudent"], }; let solution = structuredClone(code); diff --git a/content/05-Conditional-Validation/04-if-then-else/instructions.mdx b/content/05-Conditional-Validation/04-if-then-else/instructions.mdx index c71a88f..a50186f 100644 --- a/content/05-Conditional-Validation/04-if-then-else/instructions.mdx +++ b/content/05-Conditional-Validation/04-if-then-else/instructions.mdx @@ -35,7 +35,8 @@ You can use the `if-then-else` [keyword](https://json-schema.org/learn/glossary# }, "if": {"properties": {"isFullTime": {"const": true}}}, "then": {"required": ["salary"]}, - "else": {"required": ["hourlyRate"] } + "else": {"required": ["hourlyRate"] }, + "required": ["isFullTime"] } ```