Skip to content

Commit

Permalink
feat: [M3-7564] – Update OBJ validation (#10063)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwiley-akamai authored Jan 18, 2024
1 parent 6efd22c commit 76295c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/validation": Changed
---

Revised createObjectStorageKeysSchema to include optional 'regions' field ([#10063](https://github.com/linode/manager/pull/10063))
6 changes: 5 additions & 1 deletion packages/validation/src/objectStorageKeys.schema.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { object, string } from 'yup';
import { object, string, array } from 'yup';

export const createObjectStorageKeysSchema = object({
label: string()
.required('Label is required.')
.min(3, 'Label must be between 3 and 50 characters.')
.max(50, 'Label must be between 3 and 50 characters.')
.trim(),
regions: array()
.of(string())
.min(1, 'Regions must include at least one region')
.notRequired(),
});

0 comments on commit 76295c5

Please sign in to comment.