练习这里写的内容:ScalaForms,我创建了以下表单:
val personCreationForm = Form(
tuple (
"name" -> nonEmptyText,
"age" -> number verifying (min(0), max(100)) /*ERROR*/
) verifying ("Wrong entry", result => result match {
case (name, age) => true
})
)
但是,错误verifying
指出value verifying is not a member of (java.lang.String, play.api.data.Mapping[Int])
.
如引用的示例中所示,使用mapping
而不是tuple
没有区别。这里有什么问题?