title: Conditional mapping in play scala
body: <p>Using play 2.x, I have the following Form mapping:</p>
  
  <pre><code>val relocationDtoForm: Form[RelocationDto] = Form(
    mapping(
      "_type" -&gt; text,
      "sourceToken" -&gt; text,
      "exchange" -&gt; optional(jodaDate("dd/MM/yyyy")),
      "completion" -&gt; optional(jodaDate("dd/MM/yyyy")),
      "expectedMoveIn" -&gt; optional(jodaDate("dd/MM/yyyy"))
    )(RelocationDto.apply)(RelocationDto.unapply)
  )
  </code></pre>
  
  <p>I would like to add validation so that if _type=="sale", then exchange is a required field, but if _type=="let" then expectedMoveIn is a required field. I cant seem to find a way to  do this with the standard play validators, is there a way to do it?</p>
  
  <p>Cheers
  Nic</p>