Skip to content

Commit

Permalink
chore: add properties in the required field
Browse files Browse the repository at this point in the history
closes #62
  • Loading branch information
JeelRajodiya committed Aug 25, 2024
1 parent b3252af commit 6c748d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/05-Conditional-Validation/04-if-then-else/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const code: any = {
},
},

required: ["name"],
required: ["name", "isStudent"],
};

let solution = structuredClone(code);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
```

Expand Down

0 comments on commit 6c748d9

Please sign in to comment.