object JsonValidationError extends Serializable
- Source
- JsonValidationError.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- JsonValidationError
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def apply(message: String, args: Any*): JsonValidationError
import play.api.libs.json.JsonValidationError val simpleError = JsonValidationError("error.key1") val detailedError = JsonValidationError("error.key1", "details")
- object Detailed
Extracts the first error details (message and its first argument).
Extracts the first error details (message and its first argument).
import play.api.libs.json.JsonValidationError def details(err: JsonValidationError): Option[(String, Any)] = err match { case JsonValidationError.Detailed(msg, arg) => Some(msg -> arg) case _ => None }
- object Message
Extracts the first error message.
Extracts the first error message.
import play.api.libs.json.JsonValidationError def msg(err: JsonValidationError): Option[String] = err match { case JsonValidationError.Message(msg) => Some(msg) case _ => None }