vendredi 9 janvier 2015

Zend 2 ImputFilter


Vote count:

0




i'm working with Krishna Shasankar Zend2 book. And now i get a problem with InputFilter. It don't work. As discribed at book i make filter file:



<?php
namespace Users\Form;
use Zend\InputFilter\InputFilter;
class LoginFilter extends InputFilter{
public function _construct (){
$this->add(array(
'name' => 'email',
'required' => true,
'validators' => array(
array(
'name' => 'EmailAddress',
'options' => array(
'domain' => true,
),
),
),
));

$this->add(array(
'name' => 'password',
'required' => true,
));
}
}


Then in my controller i call it, use setData and isValid. But when testing it didn't work. Is this book not actuall anymore?((



asked 1 min ago







Zend 2 ImputFilter

Aucun commentaire:

Enregistrer un commentaire