diff --git a/index.html b/index.html index 271eed8..f3ede40 100644 --- a/index.html +++ b/index.html @@ -13,11 +13,14 @@

Register for the - Ourworld Mkusanyiko + Ourworld Mkusanyiko

+
+
26 October 2022 @@6PM
+

- Located at Mbweni Ruins, Jungle Paradise Resort - Ourworld Mkusanyiko will bring together Africa's emerging leaders that shape the regenerative, inclusive and empowering digital future of Africa.

-
+ Join us at Mbweni Ruins, Jungle Paradise Resort to celebrate - with music, artists & food - our collective effort to pave the way towards a regenerative, inclusive and empowering digital future in Africa. Shuttles available from conference center. +
@@ -62,7 +65,7 @@
diff --git a/templates/emailreq.html b/templates/emailreq.html new file mode 100644 index 0000000..8f4cec7 --- /dev/null +++ b/templates/emailreq.html @@ -0,0 +1,56 @@ + + +
+
+
+ + +
+
+ +
+
+ + http:// + +
+ +
+
+
+
+
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ Email is required to registered for event. Please try again. +
+ + + + diff --git a/templates/invalid.html b/templates/invalid.html new file mode 100644 index 0000000..00922dc --- /dev/null +++ b/templates/invalid.html @@ -0,0 +1,56 @@ + +
+
+
+
+ + +
+
+ +
+
+ + http:// + +
+ +
+
+
+
+
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ You've entered invalid input. Please try again. +
+
+ + + diff --git a/ticket.v b/ticket.v index f4c2a86..0114aa8 100644 --- a/ticket.v +++ b/ticket.v @@ -43,12 +43,27 @@ pub fn (mut app App) full() vweb.Result { return $vweb.html() } +pub fn (mut app App) emailreq() vweb.Result { + return $vweb.html() +} + +pub fn (mut app App) invalid() vweb.Result { + return $vweb.html() +} + ['/register'; post] pub fn (mut app App) register(name string, email string, org_website string, plus_one string, receive_communication string) vweb.Result { files := os.ls('registrations') or { [] } - // if files.len > 1000 { - // return full() - // } + if files.len > 1000 { + return app.full() + } + if email.len < 5 && !email.contains('@') && !email.contains('.') { + return app.emailreq() + } + if email.len > 100 || name.len > 100 || org_website.len > 200 || email.contains('