Skip to content

Commit

Permalink
feat: empêcher la création de noms de fiches vides #624
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrousseau1 committed Feb 4, 2025
1 parent 969e154 commit 16614ad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const DatasheetUploadForm: FC<DatasheetUploadFormProps> = ({ datastoreId }) => {
.required(t("datasheet.name_mandatory_error"))
.max(99, t("datasheet.name_max_length_error"))
.matches(regex.datasheet_name, t("datasheet.name_regex_error"))
.transform((value) => value.trim())
.test({
name: "is-unique",
test(dataName, ctx) {
Expand Down

0 comments on commit 16614ad

Please sign in to comment.