Upgrade scalatra-forms.

This commit is contained in:
takezoe
2013-08-09 18:06:33 +09:00
parent 1b0269c567
commit 629b714dab
12 changed files with 40 additions and 37 deletions

View File

@@ -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("-")){