loading
FullScreen Fecha y Hora: 29-Apr-2024 00:54 IP Pública: 18.118.200.86 Usuario: Público
24/Feb/2014 Get all error messages from symfony 1.4 form class

Get all error messages from symfony 1.4 form class

 
Hello symfonians

This is special post for symfony developers, who struggling for get all error message from symfony-1.4 form object.


It's very easy for normal form object, see below code block :

1:  <?php
2:  $errors = array(); 
3:  foreach ($Form->getErrorSchema() as $key => $err) {  
4:    if ($key) {  
5:      $errors[$key] = $err->getMessage();  
6:    }  
7:  }
8:  ?>  


See errors array :
1:  <?php   
2:    print_r($errors);  
3:  ?>  
 
 

Ip Pública 18.118.200.86
Navegador Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
País United States
Ciudad Cambridge