当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Text::addErrorMessage方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Text::addErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Text::addErrorMessage方法的具体用法?PHP Zend_Form_Element_Text::addErrorMessage怎么用?PHP Zend_Form_Element_Text::addErrorMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Text的用法示例。


在下文中一共展示了Zend_Form_Element_Text::addErrorMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 public function init($options = null)
 {
     $this->setName('contact');
     $this->setMethod('post');
     $this->setAction('/about/contact');
     $name = new Zend_Form_Element_Text('name');
     $name->setAttrib('size', 35);
     $name->setLabel('Your Name:');
     $name->setRequired(true);
     $name->addErrorMessage('Please provide your name');
     $email = new Zend_Form_Element_Text('email');
     $email->setAttrib('size', 35);
     $email->setLabel('Your E-mail Address:');
     $email->setRequired(true);
     $email->addErrorMessage('Please provide a valid e-mail address');
     $email->addValidator('EmailAddress');
     $message = new Zend_Form_Element_Textarea('message');
     $message->setLabel('Your Message:');
     $message->setRequired(true);
     $message->setAttrib('rows', '10');
     $message->setAttrib('cols', '55');
     $message->addErrorMessage('Please specify a message');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Send Your Message!');
     $this->addElements(array($name, $email, $message, $submit));
 }
开发者ID:JernejKorosec,项目名称:z2d2,代码行数:26,代码来源:FormContact.php

示例2: _initVOId

 /**
  * @return VoManage_Form_VirtualOrganisationAttribute
  */
 public function _initVOId()
 {
     $element = new Zend_Form_Element_Text('vo_id');
     $element->setRequired(TRUE);
     $element->setAllowEmpty(false);
     $validator = new Zend_Validate_Regex("/^[a-zA-Z0-9\\-_]+\$/");
     $element->addValidator($validator);
     $element->addErrorMessage("Illegal characters detected.");
     return $this->addElement($element);
 }
开发者ID:newlongwhitecloudy,项目名称:OpenConext-engineblock,代码行数:13,代码来源:VirtualOrganisationAttribute.php

示例3: init

 public function init()
 {
     // salao_lista_nome;
     $salao_lista_nome = new Zend_Form_Element_Text("salao_lista_nome");
     $salao_lista_nome->setLabel("Nome: ");
     $salao_lista_nome->setRequired();
     $salao_lista_nome->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o nome do salão'));
     $salao_lista_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // salao_lista_email;
     $salao_lista_email = new Zend_Form_Element_Text("salao_lista_email");
     $salao_lista_email->setLabel("E-mail: ");
     $salao_lista_email->addValidator('EmailAddress');
     $salao_lista_email->addErrorMessage("E-mail inválido!");
     //$salao_lista_email->setRequired();
     $salao_lista_email->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o e-mail do salão'));
     $salao_lista_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $salao_lista_email->addFilter(new Zend_Filter_Null());
     // salao_lista_cep;
     $salao_lista_cep = new Zend_Form_Element_Text("salao_lista_cep");
     $salao_lista_cep->setLabel("CEP: ");
     $salao_lista_cep->setRequired();
     $salao_lista_cep->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o CEP do salão'));
     $salao_lista_cep->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // salao_lista_numero;
     $salao_lista_numero = new Zend_Form_Element_Text("salao_lista_numero");
     $salao_lista_numero->setLabel("Número: ");
     $salao_lista_numero->setRequired();
     $salao_lista_numero->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe o numero do salão'));
     $salao_lista_numero->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // salao_lista_complemento;
     $salao_lista_complemento = new Zend_Form_Element_Text("salao_lista_complemento");
     $salao_lista_complemento->setLabel("Complemento: ");
     $salao_lista_complemento->setAttribs(array('class' => 'form-control', 'placeholder' => ''));
     $salao_lista_complemento->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $salao_lista_complemento->addFilter(new Zend_Filter_Null());
     // salao_lista_telefone;
     $salao_lista_telefone = new Zend_Form_Element_Text("salao_lista_telefone");
     $salao_lista_telefone->setLabel("Telefone: ");
     //$salao_lista_telefone->setRequired();
     $salao_lista_telefone->setAttribs(array('class' => 'form-control', 'placeholder' => ''));
     $salao_lista_telefone->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $salao_lista_telefone->addFilter(new Zend_Filter_Null());
     $this->addElements(array($salao_lista_nome, $salao_lista_cep, $salao_lista_numero, $salao_lista_complemento, $salao_lista_email, $salao_lista_telefone));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:45,代码来源:PreLista.php

示例4: init

 public function init()
 {
     $url = Zend_Layout::getMvcInstance()->getView();
     $this->setMethod('post');
     $this->setAction($url->url(array('controller' => 'autenticacao', 'action' => 'login'), 'default', true));
     // autenticacao_email
     $autenticacao_email = new Zend_Form_Element_Text('autenticacao_email');
     $autenticacao_email->setLabel('E-mail: ');
     $autenticacao_email->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe seu e-mail'));
     $autenticacao_email->setRequired();
     $autenticacao_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $autenticacao_email->addErrorMessage("Preecnha o login");
     // autenticacao_senha
     $autenticacao_senha = new Zend_Form_Element_Password('autenticacao_senha');
     $autenticacao_senha->setLabel('Senha: ');
     $autenticacao_senha->setAttribs(array('class' => 'form-control', 'placeholder' => 'Informe sua senha'));
     $autenticacao_senha->setRequired();
     $autenticacao_senha->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $autenticacao_senha->addErrorMessage("Preencha a senha");
     $this->addElements(array($autenticacao_email, $autenticacao_senha));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:22,代码来源:Login.php


注:本文中的Zend_Form_Element_Text::addErrorMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。