For multilingual reasons, I need to check if some metadata fields have two or more textareas.
Like this :
And in the case there is not enough textareas in that field, I still want to save the item but not allow it to be public. Then I want to display a flash error message telling the invalid fields.
I’m thinking about using the before_save_item hook but I have no idea what to do next.
I understand that I can get the POST data or the record but then, do I have to return something ?
And for the flash message, AbstractPlugin doesn’t seem to have a _helper that allows redirect and flash messages, how can I get these functions outside of controllers ?
Sorry if I’m asking a lot but thanks in advance