public class Content extends Predicate
An example of a content validator. The JSONValue must be an array and it must contain integers.
{
"name" :"List of integers",
"type" :"and",
"rules" : [{"type":"array"},{"type":"content","rule":{"type":"int"}}]
}
public Content(String aName, JSONObject aRule, HashMap<String,Validator> aRuleset) throws ValidationException
ValidationException
public void validate(JSONValue aValue) throws ValidationException
Validator
aValue
- The JSONValue that has to be validated.ValidationException
- If the validation fails.Copyright © 2012. All Rights Reserved.