-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [M3-7564] – Update OBJ validation (#10063)
- Loading branch information
1 parent
6efd22c
commit 76295c5
Showing
2 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/validation/.changeset/pr-10063-changed-1705088599651.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
}); |