From 7c34a3676d294c9a1acc69f71ab3061074509160 Mon Sep 17 00:00:00 2001
From: Harald Eilertsen <haraldei@anduin.net>
Date: Tue, 30 Apr 2024 06:59:19 +0000
Subject: Rework Help module + begin tests for Setup module

---
 doc/en/hook/validate_channelname.bb | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 doc/en/hook/validate_channelname.bb

(limited to 'doc/en/hook/validate_channelname.bb')

diff --git a/doc/en/hook/validate_channelname.bb b/doc/en/hook/validate_channelname.bb
new file mode 100644
index 000000000..2ab12bbec
--- /dev/null
+++ b/doc/en/hook/validate_channelname.bb
@@ -0,0 +1,23 @@
+[h2]validate_channelname[/h2]
+
+Called when creating a new channel or changing the channel name in mod/settings.php
+
+Hook data consists of an array 
+
+	array(
+		'name' => supplied name
+	);
+
+	If the hook handler determines the name is valid, do nothing. If there is an issue with the name,
+	set $hook_data['message'] to the message text which should be displayed to the member - and the name will
+	not be accepted. 
+
+
+	Example:
+	[code]
+		if(mb_strlen($hook_data['name']) < 3)
+			$hook_data['message'] = t('Name too short.');
+	[/code]
+
+
+	
\ No newline at end of file
-- 
cgit v1.2.3