validation - How to Validate Negative BigDecimals in scala play Framework FORMS? -
i want validate (do not allow) negative amount values , in post request following validation trait have form mapping,
bigdecimal has precision , scale, how make sure of negative bigdecimals coming in request?
trait bicvalidation extends commonvaldidation { implicit val bicform = form( mapping( "id" -> optional(number), "name" -> text, "description" -> optional(text), "bid" -> optional(number), "amount" -> bigdecimal )(bic.apply)(bic.unapply) ) }