Add restriction for single characters in branch name

parent e26d1b47
......@@ -34,13 +34,19 @@ class @NewBranchForm
conjunction: "or"
}
characters = {
invalid = {
pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g
prefix: "can't contains",
conjunction: ", "
}
@restrictions = [startsWith, characters, endsWith]
single = {
pattern: /^@+$/g
prefix: "can't be",
conjunction: "or"
}
@restrictions = [startsWith, invalid, endsWith, single]
validate: =>
@branchNameError.empty()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment