Studyon Minte9.com
ZF 1.0




Input



#controller
<?php
...
$data = array(
	'username' => 'aaa ++', 
	'email' => 'aaa@ ',
);

$filters = array(
	'username' => 'StringTrim',	
);
$validators = array(
	'username' => 'Alnum',
	'email' => 'EmailAddress',
);

$input = new Zend_Filter_Input($filters, $validators, $data, $options);
	// alternatively: $input->setData($data);

if ($input->isValid()) {
	echo 'valid';
} else {
	echo 'invalid';
}


http://framework.zend.com/manual/en/zend.filter.input.html
http://devzone.zend.com/article/3030#comments-3073