(refs #163)Fixed

This commit is contained in:
takezoe
2013-10-19 18:48:50 +09:00
parent 41941df87a
commit 7c7da7379d
2 changed files with 4 additions and 3 deletions

View File

@@ -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.")