I had defined an array as input name for Phalcon\Forms\Element\Select...when i try to add PresenceOf validator to it....then even after selecting multiple values the validator is throwing error msgs..." Choose atleast one Wallet Types".
$corporate_wallets = new Select('wallets_subscribed[]', $wallets, array(
'multiple' => 'multiple',
'useEmpty' => TRUE,
'emptyText' => 'Select Wallets',
'emptyValue' => '',
));
$corporate_wallets->addValidators(array(
new PresenceOf(array(
'message' => 'Choose atleast one Wallet Types'
))
));
$corporate_wallets->setAttribute('id', 'wallettypes');
$corporate_wallets->setLabel('Select Wallet Types');
$this->add($corporate_wallets);