Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($this->_request->isPost()) {
- $filters = array(
- 'x' => array('HtmlEntities', 'StripTags', 'StringTrim'),
- 'y' => array('HtmlEntities', 'StripTags', 'StringTrim')
- );
- $validators = array(
- 'x' => array('NotEmpty', 'Int'),
- 'y' => array(
- 'Alpha',
- array('InArray', 'haystack' => array('Title', 'Date'))
- );
- // validate inputs
- $input = new Zend_Filter_Input ($filters, $validators);
- $input->setData($this->_request->getpost());
- if ($input->isValid()) {
- //
- }
Advertisement
Add Comment
Please, Sign In to add comment