-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [M3-8466] - Improve validation rules for create bucket schema #10842
Conversation
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
/^[a-z0-9.-]*$/, | ||
'Label must consist only of lowercase letters, numbers, . (period), and - (dash).' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also check for the restriction that names cannot have adjacent periods or dashes?
The following regex could work for that: ^(?!.*[.-]{2})[a-z0-9.-]+$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely an improvement upon what we have now, even if we could validate further.
/^[a-z0-9.-]*$/, | ||
'Label must consist only of lowercase letters, numbers, . (period), and - (dash).' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@linode/validation": Fixed | ||
--- | ||
|
||
Error validation for letter casing when creating object storage bucket now correctly appears for labels. ([#10842](https://github.com/linode/manager/pull/10842)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error validation for letter casing when creating object storage bucket now correctly appears for labels. ([#10842](https://github.com/linode/manager/pull/10842)) | |
Lack of `label` error validation for letter casing when creating Object Storage bucket ([#10842](https://github.com/linode/manager/pull/10842)) |
Suggestion is based on our best practices:
For Fixed changesets, describe the bug that needed to be fixed, rather than the fix itself. (e.g. say "Missing button labels in action buttons" rather than "Make label prop required for action buttons").
Begin a changeset with a capital letter, but do not end it with a period; it's not a complete sentence.
Description 📝
The API currently returns an error when creating buckets, incorrectly checking for 'name' instead of 'label'. While a fix for this issue is planned for the future, we can improve our validation in the interim.
Changes 🔄
Target release date 🗓️
N/A
Preview 📷
How to test 🧪
Prerequisites
Reproduction steps
Verification steps
As an Author I have considered 🤔
Check all that apply