diff --git a/src/components/project/CreaProjectCard.vue b/src/components/project/CreaProjectCard.vue index 01458361..b0efce27 100644 --- a/src/components/project/CreaProjectCard.vue +++ b/src/components/project/CreaProjectCard.vue @@ -19,7 +19,10 @@ v-model="project.projectName" :label="$t('createProjectCard.projectName') + ' *'" lazy-rules - :rules="[(val) => (val && val.length > 0) || $t('createProjectCard.inputWarning')]" + :rules="[ + (val) => (val && val.length > 0) || $t('createProjectCard.inputWarning[0]'), + (val) => (val && !val.endsWith(' ')) || $t('createProjectCard.inputWarning[1]'), + ]" /> @@ -223,7 +226,7 @@ export default defineComponent({ return this.loggedWithGithub && this.isShowSyncBtn && !this.isShowGithubSyncPanel; }, disableSubmitBtn() { - return this.project.projectName === '' || this.project.language === '' || this.project.config === ''; + return this.project.projectName === '' || this.project.language === '' || this.project.config === '' || this.project.projectName.endsWith(' '); }, }, methods: { diff --git a/src/components/project/RenameProjectDialog.vue b/src/components/project/RenameProjectDialog.vue index a8bd922e..386f9a52 100644 --- a/src/components/project/RenameProjectDialog.vue +++ b/src/components/project/RenameProjectDialog.vue @@ -14,16 +14,20 @@ v-model="newProjectName" :label="$t('renameProject.inputLabel')" lazy-rules - :rules="[(val) => (val && val.length > 0) || $t('renameProject.inputError')]" + :rules="[ + (val) => (val && val.length > 0) || $t('renameProject.inputError'), + (val) => (val && !val.endsWith(' ')) || $t('createProjectCard.inputWarning[1]'), + ]" />
- +