Bug #6992

ValidatorResolver does not build certain validators

Added by Robert Lemke about 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Validation
Start date:
2010-03-18
Due date:
% Done:

100%

Estimated time:
10.00 h
PHP Version:
Has patch:
Complexity:

Description

If object types are specified with a leading backslash, for example in a model:

    /**
     * @var \F3\Party\Domain\Model\PersonName
     */
    protected $name;

... then they are not recognized by the validator resolver because it checks if an object with exactly that name is registered at the Object Manager. However, fully qualified class names must not start with a leading backslash when used in a string – therefore the Object Manager doesn't know such an object.

Therefore resolveValidatorObjectName() should strip a leading backslash from the given type, should one exist.

#1

Updated by Robert Lemke about 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4012.

Also available in: Atom PDF