Wiring up my model's data annotations for error message to dictionary
I have this simple contact form with 3-4 fields and some error messages driven by data annotations (like required and data format). I would like those values to be pulled from Umbraco, ideally from dictionary items. This is also mainly because these error messages need to be localized in different languages.
My alternative will possibly be .resx files. But I was wondering if there is a fun / smart way to do this with Umbraco's data / cms driven functionnalities so that my content users can edit these.
Wiring up my model's data annotations for error message to dictionary
I have this simple contact form with 3-4 fields and some error messages driven by data annotations (like required and data format). I would like those values to be pulled from Umbraco, ideally from dictionary items. This is also mainly because these error messages need to be localized in different languages.
My alternative will possibly be .resx files. But I was wondering if there is a fun / smart way to do this with Umbraco's data / cms driven functionnalities so that my content users can edit these.
Thanks!
Hi Sébastien,
Did you in the meantime found a way to get the errormessages from the umbraco dictionary? Hope you can help me.
Thanks!
Jarno
Well, now I know what I'll be doing during the weekend, whether you've found a solution or not. This sounds cool
Unfortunately, this was 6 years ago haha :D I really don't remember how I handled the case :)
This was before Umbraco 7 if my memory serves well.
If you guys find a fun way to do this, do share !
Thanks for your reply. I found a way with custom atributes so i'm implementing it on this way now.
Helpers.Dictionary.TranslatedLabel(null, umbracoDictionaryKey); is a function that gets the text from my umbraco dictionary.
is working on a reply...