This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This is a small example of how to use Play! Json to validate a JsValue, when you need to consider a combination | |
* of fields. In this example, I have ContactInfo, where either a phone number or an email address have to provided | |
* (or both). Each field is represented as a simple String, when in reality you may want to do further validation | |
* on each field to make sure it is a valid phone number and/or email. | |
*/ | |
import play.api.libs.json._ | |
object Main { |
NewerOlder