Created
March 2, 2016 19:52
-
-
Save andervilo02/5c784296af7b68c7b739 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Application_Form_Teste extends Zend_Form | |
{ | |
public function init() | |
{ | |
$this->setName('fornecedor'); | |
$this->setAttrib('class', 'form-horizontal'); | |
$this->addElementPrefixPath( | |
'Validate', APPLICATION_PATH . '/forms/validate/', 'validate' | |
); | |
} | |
$cnpj = new Zend_Form_Element_Text('cnpj'); | |
$cnpj->setLabel('CNPJ') | |
->setRequired(true) | |
->addFilter('StripTags') | |
->addFilter('StringTrim') | |
->addValidator($notEmpty, true) | |
->addValidator('Cnpj') | |
->setAttrib('class', 'form-control cnpj') | |
->setAttrib('placeholder', 'CNPJ'); | |
$uf = new Zend_Form_Element_Text('uf'); | |
$uf->setLabel('Estado') | |
->setRequired(true) | |
->addFilter('StripTags') | |
->addFilter('StringTrim') | |
->addValidator($notEmpty, true) | |
->addValidator('Estado') | |
->setAttrib('class', 'form-control text-uppercase') | |
->setAttrib('v-model', 'fornecedor.uf') | |
// ->setAttrib('v-on:keyup', 'buscaSigla') | |
->setAttrib('placeholder', 'ESTADO') | |
->setAttrib('maxLength', 2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment