mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
Upgrade scalatra-forms.
This commit is contained in:
@@ -8,7 +8,7 @@ trait Validations {
|
||||
* Constraint for the identifier such as user name, repository name or page name.
|
||||
*/
|
||||
def identifier: Constraint = new Constraint(){
|
||||
def validate(name: String, value: String): Option[String] =
|
||||
override def validate(name: String, value: String): Option[String] =
|
||||
if(!value.matches("^[a-zA-Z0-9\\-_]+$")){
|
||||
Some(s"${name} contains invalid character.")
|
||||
} else if(value.startsWith("_") || value.startsWith("-")){
|
||||
|
||||
Reference in New Issue
Block a user