Enforce a rule: throw AwValidationError with the message
Invalid <name>: <reason> when problem(value) reports one, else return value
unchanged. Client methods that return a promise call it inside the async body,
so a rejected input rejects the promise (and sends no request) instead of
throwing synchronously.
Enforce a rule: throw AwValidationError with the message
Invalid <name>: <reason>whenproblem(value)reports one, else returnvalueunchanged. Client methods that return a promise call it inside the async body, so a rejected input rejects the promise (and sends no request) instead of throwing synchronously.