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]")