How can I output HTML from a Zend Validation Error? -
I'm trying to output a link to this Zend Validator that goes to a resetabase form. At the moment, it outputs HTML to text. Any ideas on how to write it on page as HTML?
Thank you!
Here's my code:
Secure $ _authAdapter; Secure $ _messageTemplates = array (auto :: NOT_UNIQUE = & gt; 'This email is already registered! & Lt; a href = \' / user / resetpass / \ '& gt; reset your password? Lt; / a & gt; '); Public function is valid ($ value, $ context = null) {$ value = (string) $ value; $ User = new users (array ('db' = & gt; 'tdb')); If ($ user- & gt; UserExist ($ value)) {$ this- & gt; Terror (auto :: NOT_UNIQUE); return false; } Back true; }}
You must pass the configuration option 'escape' = near the Zend_Form_Decorator_Errors () .
Mostly it loads automatically, so you have to request it.
$ zendelement-> GetDecorator ('Zend_Form_Decorator_Errors') - & gt; Setoption 'escape', false);
Comments
Post a Comment