In D7 there appear to be various methods by which a module can carry out validation of a form's fields, including:
- #element_validate callback
- #validate callback
- hook_field_validate() implementation
- hook_form_validate() implementation
- hook_field_attach_validate() implementation
Firstly, can anyone list the execution order of the above?
Secondly, can anyone please explain why one might choose to use a callback instead of a hook or a hook instead of a callback?