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 Cocoframework\Web_Kernel\Html\Helper; | |
| use Aura\Html\Helper\AbstractHelper; | |
| use Aura\Input\Form; | |
| class InputErrors extends AbstractHelper | |
| { | |
| public function setIntl($intl) | |
| { | |
| $this->intl = $intl; | |
| } | |
| public function setUl($ul_helper) | |
| { | |
| $this->ul_helper = $ul_helper; | |
| } | |
| public function __invoke(Form $form, $field) | |
| { | |
| $errors = $form->getMessages($field); | |
| foreach ($errors as $error) { | |
| // $error | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so you can call like
echo $this->inputErrors($this->contact_form, 'email');