mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-09 11:55:21 +02:00
Better URL validation (#1507)
* Add correct git branch name validation * Change git refname validation error constant name * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add git reference name validation unit tests * Remove unused variable in unit test * Implement URL validation based on GoLang url.Parse method * Backward compatibility with older Go compiler * Add url validation unit tests
This commit is contained in:
parent
941281ae12
commit
f42ec6120e
11 changed files with 432 additions and 9 deletions
|
@ -233,6 +233,7 @@ Content = Content
|
|||
require_error = ` cannot be empty.`
|
||||
alpha_dash_error = ` must be valid alphanumeric or dash(-_) characters.`
|
||||
alpha_dash_dot_error = ` must be valid alphanumeric, dash(-_) or dot characters.`
|
||||
git_ref_name_error = ` must be well formed git reference name.`
|
||||
size_error = ` must be size %s.`
|
||||
min_size_error = ` must contain at least %s characters.`
|
||||
max_size_error = ` must contain at most %s characters.`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue