score:0

You can use flatmap to combine the JsResults.

score:0

This is how you can join two JsResult into one:

import play.api.libs.json._
import play.api.libs.functional.syntax._

def update(uid:String) =  Action { request =>
  (JsString(uid).validate[BSONObjectID] and request.body.validate[User]).tupled 
    match {
      case JsSuccess((uid,user),_) =>  Async {

tupled and and is part of the play.api.libs.functional package.


Related Query

More Query from same tag