Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/manager/.changeset/pr-13494-fixed-1773408872058.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/manager": Fixed
---

Destination Form: the Endpoint field is not clearing validation error when a Bucket is selected ([#13494](https://github.com/linode/manager/pull/13494))
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ export const DestinationAkamaiObjectStorageDetailsForm = ({
field.onChange(bucket?.label || '');
setValue(
controlPaths?.host,
bucket?.s3_endpoint || bucket?.hostname || ''
bucket?.s3_endpoint || bucket?.hostname || '',
{ shouldValidate: true }
);
}}
options={buckets}
Expand Down
4 changes: 2 additions & 2 deletions packages/validation/src/delivery.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ const hostRgx =
const akamaiObjectStorageDetailsBaseSchema = object({
host: string()
.max(maxLength, maxLengthMessage)
.required('Host is required.')
.required('Endpoint is required.')
.test(
'host-must-match-with-bucket-name-if-provided',
'Bucket name provided as a part of the host must be the same as the bucket.',
'Bucket name provided as a part of the endpoint must be the same as the bucket.',
(value, ctx) => {
if (ctx.parent.bucket_name) {
const groups = hostRgx.exec(value)?.groups;
Expand Down
Loading