scala - Constraints validation without Form with Play2.6 -
i got following errors after upgraded play framework 2.5 2.6. (it able compile 2.5) scala version: 2.11.8
ambiguous reference overloaded definition, [error] both method emailaddress in trait constraints of type => play.api.data.validation.constraint[string] [error] , method emailaddress in trait constraints of type (errormessage: string)play.api.data.validation.constraint[string] [error] match argument types (string) [error] constraints.emailaddress("test@sample.com") ^ is there way use methods under constraints play 2.6?
import play.api.data.validation._ val result = constraints.emailaddress("test@sample.com")
emailaddress method internally calls overridden method emailaddress(errormessage: string = "error.email") method if call emailaddress parameter give compilation error, can test this
val result = constraints.emailaddress result("test@sample.com")
Comments
Post a Comment