Rx: Simple, Extensible Schemata
//str
The //str type accepts strings and only strings.
The optional value parameter may provide an exact value to be compared against. If this parameter is given, the schema will only accept a string that is equal to the parameter's value.
The optional length parameter may provide a range of acceptable values for the length of the string. Providing both range and value is not an error, but the Rx implementation may choose to return a //fail schema if no value could possibly satisfy the combination of the given value and range of length.
/.meta/str, the schema for //str definitions:
{
"type": "//rec",
"required": {
"type": { "type": "//str", "value": "//str" }
},
"optional": {
"value": { "type": "//str" },
"length": { "type": "/.meta/range" }
}
}