[html-formfu] Prefixing error messages

Matthias Dietrich perl at rainboxx.de
Tue Mar 1 14:04:25 GMT 2011


Hi,

I'm using FormFu with Catalyst and I'm i18n'ing all labels and error messages.

On my registration form a user has to enter a password and repeat it in another input field.  I use the Equal constraint here so the form is invalid if the both field values are not equal.  The error message by FormFu is then whatever "form_constraint_equal" is i18n'ed to.  This is fine in the first step.

However, when using such a constraint on more than one form I want to address the issue in context to the form.  On the registration form I may want to say something like "Your passwords have to be equal" and on another form "Your email address has to be the same as ...".  The Equal constraint is only one example.

Is there a possibility to prefix the i18n tag with something, so that the message "form_constraint_equal" will be like "Registration.form_constraint_equal" on the registration form and "Newsletter.form_constraint_equal" on a newsletter form?

Thanks,
  Matthias

-- 
rainboxx Software Engineering
Matthias Dietrich

rainboxx Matthias Dietrich   |  Phone: +49 7141 / 2 39 14 71
Königsallee 43               |  Fax  : +49 3222 / 1 47 63 00 
71638 Ludwigsburg            |  Mobil: +49  151 / 50 60 78 64
                             |  WWW  :  http://www.rainboxx.de

CPAN: http://search.cpan.org/~mdietrich/
XING: https://www.xing.com/profile/Matthias_Dietrich18
GULP: http://www.gulp.de/profil/rainboxx.html







More information about the HTML-FormFu mailing list