Michal,

first I have to say that the coding I posted in my answer is deprecated.
I realised this after taking a look into AgaviValidationManager. Instead
you should use:

$vi = new AgaviValidationIncident(null);
$vi->addError('User name already in use',
               'name_not_unique',
                array('name'));
$this->getContext()->getValdiationManager()->addIncident($vi);

Regarding the error message. You can retrieve possible from a validator
using its getErrorMessage method. The validator can be accessed by using
getChild method of the ValidationManager. I'm not sure if that's the way
the problem should be solved... especially with translation in mind.

Regards, Mathias

Michal Charemza wrote:
> Can I just clarify something with this method: Is there a way to  
> automatically use the messages specified in the validation XML file? I  
> would prefer all validation messages to be specified in the one place.
> 
> Michal.

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to