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

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -