ValidationVisitorInterface deprecated

ValidationVisitorInterface deprecated

interface ValidationVisitorInterface

deprecated

since version 2.5, to be removed in 3.0.

Validates values against constraints defined in {@link MetadataInterface} instances.

This interface is an implementation of the Visitor design pattern. A value is validated by first passing it to the {@link validate} method. That method will determine the matching {@link MetadataInterface} for validating the value. It then calls the {@link MetadataInterface::accept} method of that metadata. accept() does two things:

  1. It calls {@link visit} to validate the value against the constraints of the metadata.
  2. It calls accept() on all nested metadata instances with the correspon