Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 705 Bytes

validator.md

File metadata and controls

19 lines (13 loc) · 705 Bytes

Validator Subscriber

Register the validator subscriber:

use Phpro\SoapClient\Event\Subscriber\ValidatorSubscriber;

$eventDispatcher->addSubscriber(new ValidatorSubscriber($validator));

It is possible to use the Symfony validator component to validate your request objects before sending them to the server. Since some servers return very cryptographic errors, the validation of request components could save you a lot of time during development.

It will hook in to the Request event and will throw a RequestException when your request object doesn't contain valid data.

No more crappy error messages from the soap server!