Custom validators should not be only added to field_validation/plugins/validator but we should be able to create them in our module and they should be find by Field Validation.
Maybe the convention should be my_module/plugins/validator...

Like Token module, it search for a file named my_module.tokens.inc for hook_token_info().

Comments

g089h515r806’s picture

you could do it using following code:

function mymodule_extras_ctools_plugin_directory($module, $plugin) {
  if ($module == 'field_validation' && $plugin == 'validator') {
    return 'plugins/' . $plugin;
  }
}
g089h515r806’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rob c’s picture

Issue summary: View changes

Just for reference, i've added this info + info about the validation folder (ctools) to the manual page.