mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 21:15:49 +01:00
(refs #163)Remove escaping for '.'
This commit is contained in:
@@ -9,7 +9,7 @@ trait Validations {
|
||||
*/
|
||||
def identifier: Constraint = new Constraint(){
|
||||
override def validate(name: String, value: String): Option[String] =
|
||||
if(!value.matches("^[a-zA-Z0-9\\-_\\.]+$")){
|
||||
if(!value.matches("^[a-zA-Z0-9\\-_.]+$")){
|
||||
Some(s"${name} contains invalid character.")
|
||||
} else if(value.startsWith("_") || value.startsWith("-")){
|
||||
Some(s"${name} starts with invalid character.")
|
||||
|
||||
@@ -2,8 +2,7 @@ package util
|
||||
|
||||
import org.specs2.mutable._
|
||||
|
||||
class
|
||||
ValidationsSpec extends Specification with Validations {
|
||||
class ValidationsSpec extends Specification with Validations {
|
||||
|
||||
"identifier" should {
|
||||
"validate id string " in {
|
||||
|
||||
Reference in New Issue
Block a user