Skip to content

Commit

Permalink
Merge pull request #1501 from dandi/fix-create-dandiset-max-lengths
Browse files Browse the repository at this point in the history
Fix max length for name/description on Create Dandiset page
  • Loading branch information
mvandenburgh committed Feb 24, 2023
2 parents 122c6dd + 435cfbd commit a3e0219
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions web/src/views/CreateDandisetView/CreateDandisetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
label="Name*"
hint="Provide a title for this dataset"
persistent-hint
:counter="120"
:counter="nameMaxLength"
required
outlined
/>
<v-textarea
v-model="description"
label="Description*"
hint="Provide a description for this dataset"
:counter="3000"
:counter="descriptionMaxLength"
persistent-hint
required
outlined
Expand Down Expand Up @@ -145,6 +145,10 @@ const awardNumberRules = computed(
() => [(v: string) => awardNumberValidator(v) || VALIDATION_FAIL_MESSAGE],
);
const nameMaxLength: ComputedRef<number> = computed(() => store.schema.properties.name.maxLength);
const descriptionMaxLength: ComputedRef<number> = computed(
() => store.schema.properties.description.maxLength,
);
const dandiLicenses: ComputedRef<LicenseType[]> = computed(
() => store.schema.definitions.LicenseType.enum,
);
Expand Down

0 comments on commit a3e0219

Please sign in to comment.