Validate value against rule and convert it to its typed form. Throws an Error whose message is the spec's error text.
value
rule
Validate
valueagainstruleand convert it to its typed form. Throws an Error whose message is the spec's error text.