This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f9f1e0b Ensure non-empty statement
8f9f1e0b is described below

commit 8f9f1e0b62ee0898e411b9a3766d45e576e6deb5
Author: Sebb <[email protected]>
AuthorDate: Wed Jan 29 12:26:44 2025 +0000

    Ensure non-empty statement
---
 www/members/nominate_board.cgi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/www/members/nominate_board.cgi b/www/members/nominate_board.cgi
index 4f45fe33..10dde4d7 100755
--- a/www/members/nominate_board.cgi
+++ b/www/members/nominate_board.cgi
@@ -60,6 +60,8 @@ end
 # Validation as needed within the script
 # Returns: 'OK' or a text message describing the problem
 def validate_form(formdata: {})
+  statement = formdata['statement']
+  return "Please provide a statement" unless statement =~ %r{\S{3,}.+\S{3,}} # 
at least 2 three-letter words!
   uid = formdata['availid']
   chk = ASF::Person[uid]&.asf_member?
   chk.nil? and return "Invalid availid or non-Member suppiled: 
(#{uid})\n\nStatement:\n#{formdata['statement']}"

Reply via email to