zend framework2 - How to pass error message from Controller Action to Form on form submit. -


while creating form, form validation easy. how can 1 validate submitted data , pass error message form.

for example have form password change, need verify old password , check if new password , confirm password same, , in failure stage, show message on password edit form.

you mean in view script ?

<?php if ($form->getmessages()){     // alert     ?>     <div class="alert alert-error">         <button class="close" data-dismiss="alert" type="button">×</button>         <strong><?php echo $this->translate("are awake ?"); ?></strong>         <?php echo $this->translate("some data not filled out correctly."); ?>     </div>            <?php }?> 

after print errors $form->getmessages()


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -