2
升级后的播放框架从2.5升级到2.6后,出现以下错误。 (这是能与2.5编译) 斯卡拉版本:2.11.8不带Form的约束验证与Play2.6
ambiguous reference to overloaded definition,
[error] both method emailAddress in trait Constraints of type => play.api.data.validation.Constraint[String]
[error] and method emailAddress in trait Constraints of type (errorMessage: String)play.api.data.validation.Constraint[String]
[error] match argument types (String)
[error] Constraints.emailAddress("[email protected]")
^
有没有办法使用的约束下与方法2.6播放?
import play.api.data.validation._
val result = Constraints.emailAddress("[email protected]")