Skip to content

Instantly share code, notes, and snippets.

@rufinus
Created December 10, 2012 15:54
Show Gist options
  • Select an option

  • Save rufinus/4251415 to your computer and use it in GitHub Desktop.

Select an option

Save rufinus/4251415 to your computer and use it in GitHub Desktop.
input filter no object exists
$inputFilter->add(
$factory->createInput(array(
'name' => 'email',
'required' => true,
'filters' => array(
array('name' => 'StripTags'),
array('name' => 'StringTrim')
),
'validators' => array(
array(
'name' => 'EmailAddress'
),
array(
'name' => 'StringLength',
'options' => array(
'encoding' => 'UTF-8',
'min' => 1,
'max' => 150
)
),
array(
'name' => 'DoctrineModule\Validator\NoObjectExists',
'options' => array(
'object_repository' => $this->entityManager->getRepository('Admin\Entity\User'),
'fields' => array('email')
)
)
)
))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment