Skip to content

Commit

Permalink
add input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkst-pieter committed Dec 6, 2024
1 parent 3671408 commit 38420f1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend_vue/src/utils/formValidators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,16 @@ export const formValidators: ValidateSchemaType = {
[TOKENS_TYPE.WEBDAV]: {
schema: Yup.object().shape(validationNotificationSettings),
},
[TOKENS_TYPE.WINDOWS_FAKE_FS]: {
schema: Yup.object().shape({
...validationNotificationSettings,
windows_fake_fs_root: Yup.string()
.required('A file path is required')
.matches(
/^[a-zA-Z]:(\\[a-zA-Z0-9_.-]+)+\\?$/,
"Invalid file path"
),
windows_fake_fs_file_structure: Yup.string().required('A file structure is required'),
}),
},
};

0 comments on commit 38420f1

Please sign in to comment.