Filter "Select XXX" dialog in Editor with custom code?

Is there a way to manually filter that “Select Blabla” dialog that appears when you use e.g. EditorGuiLayout.ObjectField() from code?

More precise, I want the user to be able to select MonoScript assets from all my scripts, but he should only be able to select some particular scripts (e.g. implementing some interface, containing some function etc…)

Up to now, I use dropdown boxes instead of the ObjectField which works okish for like 2-3 different scripts. But as the project grows, it would be much more preferable if I could use the unity build-in selection dialog (including preview icons, a search and so on).

After eating a bit of forbidden fruits, it seems to be impossible without some dark reflection magic.

I wish Unity would expose the validator function passed to DoObjectField. If someone else is really interested in a solution, I can write some reflection-based solution together (which would probably work only until the next major unity version or so…)

For now, I just go with my ugly dropdown boxes.