Last active
August 29, 2015 13:56
ZF2 フォームのバリデーションエラーメッセージ表示用ビューヘルパー
This file contains 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 | |
namespace Album\Helper; | |
use Zend\Form\View\Helper\FormElementErrors as ZendFormElementErrors; | |
/** | |
* フォームのバリデーションエラーメッセージ表示用ビューヘルパー | |
*/ | |
class FormElementErrors extends ZendFormElementErrors | |
{ | |
protected $messageCloseString = '</li></ul>'; | |
protected $messageOpenFormat = '<ul class="err-msg" %s><li>'; | |
protected $messageSeparatorString = '</li><li>'; | |
} |
This file contains 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 | |
//... | |
public function getViewHelperConfig() | |
{ | |
return array( | |
'invokables' => array( | |
'formElementErrors' => 'Album\Helper\FormElementErrors', | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment