Better domain description

This commit is contained in:
Stan Wohlwend 2024-06-04 19:53:57 +02:00
parent 035ba57d66
commit 5b3db1a7ad

View File

@ -32,13 +32,13 @@ function EditDialog(props: {
),
}),
domain: yup.string()
.matches(/^https?:\/\//, "Domain must start with http:// or https://")
.url("Domain must a valid URL")
.matches(/^https?:\/\//, "Origin must start with http:// or https://")
.url("Domain must be a valid URL")
.notOneOf(props.domains
.filter((_, i) => i !== props.editIndex)
.map(({ domain }) => domain), "Domain already exists")
.required()
.label("Domain with protocol")
.label("Origin (protocol + domain)")
.meta({
stackFormFieldPlaceholder: "https://example.com",
}),