Add restriction for single characters in branch name

parent e26d1b47
...@@ -34,13 +34,19 @@ class @NewBranchForm ...@@ -34,13 +34,19 @@ class @NewBranchForm
conjunction: "or" conjunction: "or"
} }
characters = { invalid = {
pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g
prefix: "can't contains", prefix: "can't contains",
conjunction: ", " conjunction: ", "
} }
@restrictions = [startsWith, characters, endsWith] single = {
pattern: /^@+$/g
prefix: "can't be",
conjunction: "or"
}
@restrictions = [startsWith, invalid, endsWith, single]
validate: => validate: =>
@branchNameError.empty() @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