From 5d22bef418e8e5d94bc64b417b18833cbb193282 Mon Sep 17 00:00:00 2001 From: hhu67 Date: Fri, 26 Jun 2026 00:48:28 +0300 Subject: [PATCH] =?UTF-8?q?mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm=20=D0=B1?= =?UTF-8?q?=D0=BB=D1=8F=D0=B4=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/l19/l1.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/l19/l1.go b/go/l19/l1.go index 3d7d756..a3c84d4 100644 --- a/go/l19/l1.go +++ b/go/l19/l1.go @@ -26,6 +26,15 @@ func handle(w http.ResponseWriter, r *http.Request) { http.Error(w,"no", http.StatusBadRequest) return } + CheckEmail := strings.ContainsAny(data.Email, "@.") + if CheckEmail != true { + http.Error(w, "incorrect email", http.StatusBadRequest) + return + } + if data.Age > 150 { + http.Error(w, "old", http.StatusBadRequest) + return + } defer r.Body.Close() setChan <- data