Skip to content

Commit

Permalink
Update error message when creating new document (Admin) (#1888)
Browse files Browse the repository at this point in the history
* Update error message when creating new document (Admin)

* Remove symbol

* Update indentation to fix the build

---------

Co-authored-by: ani-kalpachka <ani_kalpacka888@gmail.com>
ani-kalpachka and ani-kalpachka authored Jul 22, 2024
1 parent 8f4de2d commit c819ec0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/admin/documents/Form.tsx
Original file line number Diff line number Diff line change
@@ -23,7 +23,13 @@ const validationSchema = yup
.object()
.defined()
.shape({
type: yup.string().oneOf(validDocumentTypes).required(),
type: yup
.string()
.oneOf(
validDocumentTypes,
`Видът трябва да бъде една от следните стойности: ${validDocumentTypes.join(', ')}.`,
)
.required(),
name: yup.string().trim().min(2).max(20).required(),
filename: yup.string().trim().min(2).max(20).required(),
filetype: yup.string().trim().max(3),

0 comments on commit c819ec0

Please sign in to comment.