Skip to content

Commit

Permalink
👌 Address Ane's comments
Browse files Browse the repository at this point in the history
Add validations
Rename field
  • Loading branch information
petterhh committed Nov 26, 2024
1 parent 7227a7e commit 25ffbb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion studio/schemas/documents/admin/jobPostings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const jobPostings = defineType({
title: "Job Postings",
fields: [
{
name: "jobPostings",
name: "jobPostingsArray",
title: "Job Postings",
type: "array",
of: [{ type: jobPostingID }],
Expand Down
11 changes: 10 additions & 1 deletion studio/schemas/objects/jobPosting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const jobPosting = defineType({
name: "role",
type: "internationalizedArrayString",
description: "The name of the role",
validation: (rule) => rule.required().error("Role name is required"),
},
{
title: "Location",
Expand All @@ -27,7 +28,15 @@ const jobPosting = defineType({
title: "Recruitee ad URL",
name: "recruiteeAdUrl",
type: "url",
description: "URL to Recruitee ad",
description:
"URL to Recruitee ad. Please enter the full URL, including 'https://', e.g., 'https://www.example.com'.",
validation: (rule) => [
rule.required(),
rule.uri({
scheme: ["http", "https"],
allowRelative: false,
}),
],
},
],
preview: {
Expand Down

0 comments on commit 25ffbb0

Please sign in to comment.