pub fn validate(
suffix: &str,
payload: Option<&Value>,
) -> Result<(), PredicateError>Expand description
Validate a receipt payload against the registered schema for suffix.
- If
suffixis not registered, returnsOk(())(backward compatible: the receipt attests sign-on-submit, exactly as before). - If
suffixis registered, the payload must be a JSON object that carries everyrequiredfield and whose present fields match their declared primitive types. A missing payload is treated as the empty object and therefore fails any predicate that has required fields.