Reputation: 3950
I do not know what to write for digits validation in the below code:
$row_form = new Zend_Form(array(
'elements' => array(
'fldName' => array(
'type' => 'text',
'options'=> array(
'size'=>'15',
'maxlength' => '8',
),
'validators'=> array(
//Digits Validation
)
),
),
));
PS: I want to maintain the array notation
Upvotes: 0
Views: 1743
Reputation: 12101
add array('Digits')
like following
'validators'=> array('Digits')
Upvotes: 3
Reputation: 3950
$row_form = new Zend_Form(array(
'elements' => array(
'fldName' => array(
'type' => 'text',
'options'=> array(
'size'=>'15',
'maxlength' => '8',
'validators'=> array('Digits'),
),
),
),
));
Upvotes: 1