Form Validation Translating Field Names Bug |
In version 3, the language library and form_validation class were changed to prefix validation errors with "form_validation_". If I use my own language file for a filed name (as per the documentation), the language library logs an error that the language line could not be found (with the prefix of "form_validation_" added to it).
On closer inspection the _translate_fieldname function of the form_validation class checks if a translation is needed and then tries to load the language line with "form_validation_" prefixed and without. The later indicating that this is deprecated and not logged as an error if not found. Code: protected function _translate_fieldname($fieldname) My assumption was that I was using my own custom human readable name from my own generated language files. I do not want to change all of my language files to include a prefix of "form_validation_" when they are not always used for that purpose. They are used as a human readable name given to fields or in other views I have created. Is this a bug with the form_validation class as I suspect or an oversight in the documentation? It feels like a bug as the function name suggests it is translating a field name and not a form validation error! |
Messages In This Thread |
Form Validation Translating Field Names Bug - by splodgeco - 04-13-2015, 08:17 AM
RE: Form Validation Translating Field Names Bug - by splodgeco - 04-14-2015, 07:20 AM
RE: Form Validation Translating Field Names Bug - by alkarim - 04-16-2015, 01:32 AM
|