Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add validation with no model - is it possible?
csakip
New
I'm creating a plugin to add extra input fields to the new discussion dialog form.
I use PostController_BeforeBodyInput_Handler to add the controls to the form. They display fine.
However I can't add validation to these elements. The data in them are custom set so they are not in the models that the PostController use. Is it possible to add validation to them?
I couldn't find an event to make custom validation either. I can't stop the save action on invalid data. I can only get the form data on the PostController_AfterDiscussionSave_Handler but at that place the discussion is already saved.
0
Comments
Use BeforeSaveDiscussion.
Out of class:
http://vanillaforums.org/discussion/comment/166625/#Comment_166625
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
BeforeSaveDiscussion did the trick.
Thank you.