我想直接在Read
定义中提供自定义错误消息:
implicit val ar = (
(__ \ "firstName").read[String].customError(ValidationError("bad format", "firstName")) and
(__ \ "lastName").read[String] and
(__ \ "address").read[Address]
)(Employee)
这可能吗 ?
我想直接在Read
定义中提供自定义错误消息:
implicit val ar = (
(__ \ "firstName").read[String].customError(ValidationError("bad format", "firstName")) and
(__ \ "lastName").read[String] and
(__ \ "address").read[Address]
)(Employee)
这可能吗 ?