RE: [coldbox:3225] How to invoke a method in the containing event handler, from within a plugin?

If you want to access this validate method from outside the handler, why
is it private? Shouldn't it be public?

Also, regarding not being able to pass args to the method via runEvent.
The way you pass values to events from the handler is by placing them in
the request collection. They will automatically be available to the
event via event.getCollection();. This is why the only input to every
event is the event object.

~Brad

Hi Drew,

Simply its not a good practice of mixing of objects which should not
be.

You should have validator object as a complete independent object,
which could be used anywhere.
Second way to have validator methods in UDF, then UDF is available in
Handlers, Plugins, Views

Thanks
Sana

Hi Brad,

It is because this method in reality, shouldn't be public. If it was
public, it would be available to access via the url. Think of it more
of a helper function for validation. I mean even if we take the hole
plugin thing out of context and remove it, surely there are instances
where you have created a validation function in the handler to assist
rather then doing it inline in the event? I already know I don't want
to write the same routines twice when coming to something as simple as
CRUD, and the create vs edit events; when the fields are validated the
exact same way (and should be to avoid mistakes).

Passing this data to the RC seems like a rigged up way of handling my
situation. Then again, I think I am getting to the point where we are
rigging things up. heh.