Skip to content

Commit 602ceb5

Browse files
Namespace validation rule differs from one implemented in Studio #112
1 parent 2006ba9 commit 602ceb5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/kotlin/com/haulmont/cuba/cli/cubaplugin/project/ProjectInitCommand.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ class ProjectInitCommand : GeneratorCommand<ProjectInitModel>() {
8181
default { answers ->
8282
val notAlphaNumeric = Regex("[^a-zA-Z0-9]")
8383

84-
notAlphaNumeric.replace(answers["projectName"] as String, "").toLowerCase()
84+
notAlphaNumeric
85+
.replace(answers["projectName"] as String, "")
86+
.replace("^[0-9]+".toRegex(), "")
87+
.toLowerCase()
8588
}
8689

8790
validate {

0 commit comments

Comments
 (0)