Skip to content

Instantly share code, notes, and snippets.

@tournasdim
Forked from michael-romer/gist:3920184
Created April 5, 2014 19:41
Show Gist options
  • Save tournasdim/9997071 to your computer and use it in GitHub Desktop.
Save tournasdim/9997071 to your computer and use it in GitHub Desktop.
<?php
namespace Helloworld\Form;
use Zend\Form\Form;
use Zend\InputFilter\InputFilter;
class SignUpFilter extends InputFilter
{
public function __construct()
{
$this->add(array(
'name' => 'email',
'required'=> true,
'validators' => array(
array(
'name' => 'EmailAddress'
)
),
));
$this->add(array(
'name' => 'name',
'required' => true,
'filters' => array(
array(
'name' => 'StringTrim'
)
)
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment