Hi Brian,

You can change the relative message by setting it as an option of your
Zend_Filter_Input instance.  This can be done during instantiation or
through the setOptions() method.  You can not set different messages for
different filters/validators - only one message format per instance.  You
may want to use Zend_Validate_NotEmpty if you need more flexibility.  There
is sample code in the docs, but I will post it here to save you the trouble.


<?php
$options = array(
    'notEmptyMessage' => "A non-empty value is required for field '%field%'"
);

$input = new Zend_Filter_Input($filters, $validators, $data, $options);

// alternative method:

$input = new Zend_Filter_Input($filters, $validators, $data);
$input->setOptions($options);

-- 
View this message in context: 
http://www.nabble.com/Zend_Filter_Input-%27presence%27%3D%3E%27required%27-tp15865637s16154p15885531.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to