mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
[FEAT] Trim spaces from repository name
- This uses the `TrimSpace` preprocessing of the binding library to remove any accidental spaces from the input. - Integration test added. - Resolves #4309
This commit is contained in:
parent
310376525b
commit
4952747699
2 changed files with 19 additions and 1 deletions
|
@ -27,7 +27,7 @@ import (
|
|||
// CreateRepoForm form for creating repository
|
||||
type CreateRepoForm struct {
|
||||
UID int64 `binding:"Required"`
|
||||
RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
|
||||
RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)" preprocess:"TrimSpace"`
|
||||
Private bool
|
||||
Description string `binding:"MaxSize(2048)"`
|
||||
DefaultBranch string `binding:"GitRefName;MaxSize(100)"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue