Add a message to the changelog validation rules (#1201)

This commit is contained in:
Stuart 2023-04-27 20:02:04 +01:00 committed by GitHub
parent e68d0508ae
commit 8c89a5d460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -24,6 +24,7 @@ const props = withDefaults(
rules?: ValidationRule<string | undefined>[];
noPaddingTop?: boolean;
maxHeight?: string;
label?: string;
}>(),
{
maxlength: 30_000,
@ -52,7 +53,7 @@ const internalEditing = computed({
});
const errorMessages = computed(() => props.errorMessages);
const { v, errors } = useValidation(undefined, props.rules, rawEdited, errorMessages);
const { v, errors } = useValidation(props.label, props.rules, rawEdited, errorMessages);
if (process.client && props.editing) {
onMounted(startEditing);

View File

@ -15,6 +15,7 @@ const props = withDefaults(
rules?: ValidationRule<string | undefined>[];
noPaddingTop?: boolean;
maxHeight?: string;
label?: string;
}>(),
{
maxlength: 30_000,

View File

@ -15,6 +15,7 @@ import { useErrorRedirect } from "~/composables/useErrorRedirect";
import TagComponent from "~/components/Tag.vue";
import { hasPerms } from "~/composables/usePerm";
import Button from "~/components/design/Button.vue";
import { required } from "~/composables/useValidationHelpers";
import { MarkdownEditor } from "#components";
import Markdown from "~/components/Markdown.vue";
@ -184,6 +185,7 @@ async function restoreVersion() {
:deletable="false"
:cancellable="true"
:saveable="true"
:rules="[required()]"
@save="savePage"
/>
<template #fallback>

View File

@ -407,7 +407,7 @@ useHead(useSeo(i18n.t("version.new.title") + " | " + props.project.name, props.p
<ClientOnly>
<MarkdownEditor
ref="descriptionEditor"
:title="t('version.new.form.release.bulletin')"
:label="t('version.new.form.release.bulletin')"
:raw="descriptionToLoad"
editing
no-padding-top