• <small id='o2fpo'></small><noframes id='o2fpo'>

          <bdo id='o2fpo'></bdo><ul id='o2fpo'></ul>

        <i id='o2fpo'><tr id='o2fpo'><dt id='o2fpo'><q id='o2fpo'><span id='o2fpo'><b id='o2fpo'><form id='o2fpo'><ins id='o2fpo'></ins><ul id='o2fpo'></ul><sub id='o2fpo'></sub></form><legend id='o2fpo'></legend><bdo id='o2fpo'><pre id='o2fpo'><center id='o2fpo'></center></pre></bdo></b><th id='o2fpo'></th></span></q></dt></tr></i><div id='o2fpo'><tfoot id='o2fpo'></tfoot><dl id='o2fpo'><fieldset id='o2fpo'></fieldset></dl></div>

      1. <legend id='o2fpo'><style id='o2fpo'><dir id='o2fpo'><q id='o2fpo'></q></dir></style></legend>
        <tfoot id='o2fpo'></tfoot>

        Zend 表单验证

        时间:2023-05-30

        <i id='Ia1uP'><tr id='Ia1uP'><dt id='Ia1uP'><q id='Ia1uP'><span id='Ia1uP'><b id='Ia1uP'><form id='Ia1uP'><ins id='Ia1uP'></ins><ul id='Ia1uP'></ul><sub id='Ia1uP'></sub></form><legend id='Ia1uP'></legend><bdo id='Ia1uP'><pre id='Ia1uP'><center id='Ia1uP'></center></pre></bdo></b><th id='Ia1uP'></th></span></q></dt></tr></i><div id='Ia1uP'><tfoot id='Ia1uP'></tfoot><dl id='Ia1uP'><fieldset id='Ia1uP'></fieldset></dl></div>

        <small id='Ia1uP'></small><noframes id='Ia1uP'>

            <legend id='Ia1uP'><style id='Ia1uP'><dir id='Ia1uP'><q id='Ia1uP'></q></dir></style></legend><tfoot id='Ia1uP'></tfoot>

                <tbody id='Ia1uP'></tbody>
                • <bdo id='Ia1uP'></bdo><ul id='Ia1uP'></ul>

                  本文介绍了Zend 表单验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Zend Form 创建动态表单.

                  I am using Zend Form to create dynamic form.

                  我也有 Zend Form 验证.

                  I have Zend Form validation too.

                  尝试动态删除验证,但没有任何成功.

                  Trying to remove Validation dynamically, but not getting any success.

                  你能帮我删除 Zend 验证吗.

                  Can you plz help me to remove Zend Validation.

                  Bellow 是我的删除验证代码:

                  Bellow is my code for remove validation :

                  $toRemValArray = array();
                  $toRemValArray[0] = 'ele_4af42ceac7810';
                  
                  if(isset($_POST['btnPost_x'])){                 
                      if ($form->isValid($_POST)) {
                          $allElements = $form->getElements();
                          foreach($allElements as $val){
                              if(in_array('ele_4af42ceac7810',$toRemValArray)){
                                  $value = $form->getElement($val->getName());
                                  $value->removeValidator('ele_4af42ceac7810');
                              }
                          }
                      }
                  }
                  

                  让我知道我的代码是否有任何问题

                  Let me know whether my code is having any issue

                  谢谢穆罕默德·塔雷克

                  推荐答案

                  您应该删除调用 $form->isValid() 的验证器BEFORE.

                  You should remove the validator BEFORE calling $form->isValid().

                  这篇关于Zend 表单验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我可以在我的项目中使用 Zend translate、date 和 cache 作为独立类吗? 下一篇:Zend Framework 中的简单重写

                  相关文章

                  • <bdo id='A5oau'></bdo><ul id='A5oau'></ul>

                  1. <tfoot id='A5oau'></tfoot>

                    <small id='A5oau'></small><noframes id='A5oau'>

                      <i id='A5oau'><tr id='A5oau'><dt id='A5oau'><q id='A5oau'><span id='A5oau'><b id='A5oau'><form id='A5oau'><ins id='A5oau'></ins><ul id='A5oau'></ul><sub id='A5oau'></sub></form><legend id='A5oau'></legend><bdo id='A5oau'><pre id='A5oau'><center id='A5oau'></center></pre></bdo></b><th id='A5oau'></th></span></q></dt></tr></i><div id='A5oau'><tfoot id='A5oau'></tfoot><dl id='A5oau'><fieldset id='A5oau'></fieldset></dl></div>
                      <legend id='A5oau'><style id='A5oau'><dir id='A5oau'><q id='A5oau'></q></dir></style></legend>