From f816ef9db7ccc2ef3958feb476a96bb5e57bf627 Mon Sep 17 00:00:00 2001
From: Sean Madsen <sean@seanmadsen.com>
Date: Tue, 15 Aug 2017 15:42:29 -0600
Subject: [PATCH] Add doc for hook_civicrm_validate

(so that we can avoid a broken link in a wiki page we're migrating)
---
 docs/hooks/hook_civicrm_validate.md | 26 ++++++++++++++++++++++++++
 docs/hooks/list.md                  |  1 +
 mkdocs.yml                          |  1 +
 3 files changed, 28 insertions(+)
 create mode 100644 docs/hooks/hook_civicrm_validate.md

diff --git a/docs/hooks/hook_civicrm_validate.md b/docs/hooks/hook_civicrm_validate.md
new file mode 100644
index 00000000..38b937a2
--- /dev/null
+++ b/docs/hooks/hook_civicrm_validate.md
@@ -0,0 +1,26 @@
+# hook_civicrm_validate
+
+## Summary
+
+**(Removed)** This hook is invoked during all CiviCRM form validation. An array of errors
+detected is returned. Else we assume validation succeeded.
+
+## Availability
+
+This hook was **removed in v4.7**.
+
+## Definition
+
+```php
+hook_civicrm_validate($formName, &$fields, &$files, &$form)
+```
+## Parameters
+
+* string `$formName` - The name of the form.
+* array `&$fields` - the POST parameters as filtered by QF
+* array `&$files` - the FILES parameters as sent in by POST
+* array `&$form` - the form object
+
+## Returns
+
+* mixed - formRule hooks return a boolean or an array of error messages which display a QF Error
diff --git a/docs/hooks/list.md b/docs/hooks/list.md
index 8213a683..c299f970 100644
--- a/docs/hooks/list.md
+++ b/docs/hooks/list.md
@@ -56,6 +56,7 @@ This is an overview list of all available hooks, listed by category.
 * **[hook_civicrm_idsException](/hooks/hook_civicrm_idsException.md)** - allows you to modify the list of form or page paths where submitted data should not be sent through PHPIDS, the intrusion detection system (IDS).
 * **[hook_civicrm_postProcess](/hooks/hook_civicrm_postProcess.md)** - invoked when a CiviCRM form is submitted.
 * **[hook_civicrm_preProcess](/hooks/hook_civicrm_preProcess.md)** - can be used to modify the behavior of a form before the `buildQuickForm` call.
+* **[<del>hook_civicrm_validate</del>](/hooks/hook_civicrm_validate.md)** - **(Removed)** invoked during all CiviCRM form validation. An array of errors detected is returned. Else we assume validation succeeded.
 * **[hook_civicrm_validateForm](/hooks/hook_civicrm_validateForm.md)** - allows you to customize the logic used to validate forms.
 
 ## GUI hooks
diff --git a/mkdocs.yml b/mkdocs.yml
index aebf7a76..c0d63663 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -136,6 +136,7 @@ pages:
     - hook_civicrm_idsException: hooks/hook_civicrm_idsException.md
     - hook_civicrm_postProcess: hooks/hook_civicrm_postProcess.md
     - hook_civicrm_preProcess: hooks/hook_civicrm_preProcess.md
+    - <del>hook_civicrm_validate</del>: hooks/hook_civicrm_validate.md
     - hook_civicrm_validateForm: hooks/hook_civicrm_validateForm.md
   - GUI hooks:
     - hook_civicrm_alterMenu: hooks/hook_civicrm_alterMenu.md
-- 
GitLab