CC-3596: Playlist->Library->Edit Metadata: Throw exception after
inputing string in "BPM" - added digit validator
This commit is contained in:
parent
130bf5bed7
commit
c510286614
|
@ -84,12 +84,14 @@ class Application_Form_EditAudioMD extends Zend_Form
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add bmp field
|
// Add bmp field
|
||||||
$this->addElement('text', 'bpm', array(
|
$bpm = new Zend_Form_Element_Text('bpm');
|
||||||
'label' => 'BPM:',
|
$bpm->class = 'input_text';
|
||||||
'class' => 'input_text',
|
$bpm->setLabel('BPM:')
|
||||||
'filters' => array('StringTrim'),
|
->setFilters(array('StringTrim'))
|
||||||
'validators' => array(array('StringLength', false, array(0, 8)))
|
->setValidators(array(
|
||||||
));
|
new Zend_Validate_StringLength(array('min'=>0,'max' => 8)),
|
||||||
|
new Zend_Validate_Digits()));
|
||||||
|
$this->addElement($bpm);
|
||||||
|
|
||||||
// Add copyright field
|
// Add copyright field
|
||||||
$this->addElement('text', 'copyright', array(
|
$this->addElement('text', 'copyright', array(
|
||||||
|
|
Loading…
Reference in New Issue