Hello, I think it's a simple question, but it is related to Phalcon 2.0.* features.
I don't want to implement something being that something already exists. My models have validation implemented, and I want to add user friendly names for columns. e.g:
I have the columns name, description, some_other
. Normally the user sees an error like this "The field some_other is required.". Instead of that, I want to set a user friendly name, resulting on a message like this one for the user: "The field Some Other is required".
Later I want to use that names to create form fields. The preferred way is setting the user friendly names together with column definitions on Model class, this way the MVC will keep simple to understand for my project.
The good way to access the field user friendly name would be:
$model = new PostModel();
//Not existent way to access, but desired way DONT COPY AND PASTE
$columnUserFriendlyName = $model->userFriendly["some_other"];
As$userFriendly
is an imaginary property for Model, this should be defined somewhere inside the model Class, might be on initialize()
There's an (ALREADY EXISTENT) way to do this on Phalcon 2.0.9 version ?
Thankyou very much !