What you need is a custom validator. you can either do it extending Zend_Validate_Abstract
or you can simply use a callback validator.
To do so, you need to add this to your element:
$elem = new Zend_Form_Element_Text('elem_name');
$elem->setLabel('Label Name:')
->setRequired(true)
->addValidator('callback', true, array('callback' => array($this, 'functionName')));
$this->addElement($elem);
And in the same class (usually your form is in a class that extends Zend_Form), you add this method:
public function functionName($csvString) {
// stuff here using explode(',', $csvString)
// foreach() to iterate over the result and match against the db each $value
}
See explode() for more information.
However, if your form element is going to be called more than once, and in different forms, then I don't recommend you to use a callback, but you'd better write your own validator, the theory remains the same though. Take a look here for more information about how to write validators.