File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 193
193
"placeholder" : " my-app" ,
194
194
"tooltip" : " Change base folder" ,
195
195
"action" : " Select this folder" ,
196
- "folder-exists" : " This folder already exists"
196
+ "folder-exists" : " This folder already exists" ,
197
+ "folder-name-invalid" : " Folder name invalid"
197
198
},
198
199
"manager" : {
199
200
"label" : " Package manager" ,
Original file line number Diff line number Diff line change 50
50
/>
51
51
</div >
52
52
53
+ <div
54
+ v-if =" formData.folder && !folderNameValid"
55
+ class =" vue-ui-text danger banner"
56
+ >
57
+ <VueIcon icon =" error" class =" big" />
58
+ <span >{{ $t('views.project-create.tabs.details.form.folder.folder-name-invalid') }}</span >
59
+ </div >
60
+
53
61
<ApolloQuery
54
62
v-if =" formData.folder"
55
63
:query =" require('../graphql/folderExists.gql')"
@@ -477,8 +485,13 @@ export default {
477
485
},
478
486
479
487
computed: {
488
+ folderNameValid () {
489
+ const name = this .formData .folder
490
+ return ! name .match (/ [/@\s +%:] / ) && encodeURIComponent (name) === name
491
+ },
492
+
480
493
detailsValid () {
481
- return !! this .formData .folder
494
+ return !! this .formData .folder && this . folderNameValid
482
495
},
483
496
484
497
presetValid () {
You can’t perform that action at this time.
0 commit comments