#1
Hello
I get a 'class not found' error when trying to call a method from a module in a view. I created a module called validation_helper_es, which is a copy of validation_helper.php, with the only difference being that I translated the validation messages to Spanish. Considering there is a method called in the view called 'validate_errors', I created a method with a different name, but it's not being able to call it.

The call was made form a Module named Departamentos.


Modules/controllers/Departamentos.php



File: Modules/departamentos/views/create.php


File: Modules/controllers/validation_helper_es



Thanks
#2
Hello
It looks like your validation helper code runs before the submit button.


Did you mean for this to run after someone submits a form, or as someone is filling in the form fields?

Dan
#3
Hi udiaz60,

I think your problem lays with the fact that your module for 'Validation_helper_es' doesn't extend Trongate as a normal module would.


Also, if you look in 'ignition.php' you can see how the helpers are being loaded in Trongate


I like your idea with a Spanish version of the validation helper but there might be cleaner ways to implement it.

hope this helps :)
#4
Greetings from Colombia, thank you for the answers and the time you have taken to review the case. I found the problem: the function is outside the class, that's why I couldn't call it. This differs from the behavior of the original helper_validator. I am looking for the best way to extend the functionality to adapt it to Spanish without touching the core of the framework. Ideas are welcome.


Thanks.