title: Play 2.3 JSON convert string to number and validate
body: <p>I have JSON:</p>
  
  <pre><code>{"amount":"123.45"}
  </code></pre>
  
  <p>and I want to convert it to class <code>case class Record(amount: BigDecimal)</code>.</p>
  
  <p>Automatic Play reads (<code>Json.reads[Record]</code>) works fine until I need to validate whether amount is <code>&gt; 0.01</code>. I wrote custom reads:</p>
  
  <pre><code>val recordReads: Reads[Record] = (
      (JsPath \ "amount").read[String].map(x =&gt; BigDecimal(x))(min(BigDecimal("0.01")))
  )(Record.apply _)
  </code></pre>
  
  <p>but this solution makes compilation error <code>Cannot prove that scala.math.BigDecimal &lt;:&lt; scala.math.BigDecimal =&gt; C.</code>. The same if I change <code>BigDecimal</code> with <code>Double</code> etc.</p>
  
  <p><strong>How can I transform string to <code>BigDecimal</code> and also validate at the same time?</strong> Thanks for ideas!</p>