livr
Version:
Lightweight validator supporting Language Independent Validation Rules Specification
14 lines (13 loc) • 412 B
JSON
{
"city1": { "eq": "Moscow" },
"city2": [{ "eq": "Moscow" }],
"city3": { "eq": "Kiev" },
"number1": { "eq": 1 },
"number2": { "eq": 1 },
"number3": { "eq": 1.2 },
"empty_string": {"eq": 1 },
"value_is_hash": { "eq": "Moscow" },
"value_is_empty_hash": { "eq": "Moscow" },
"value_is_array": { "eq": "Moscow" },
"value_is_empty_array": { "eq": "Moscow" }
}