diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor b/ImageBoardServerApp/Pages/Accounts/Register.razor index c955f09..7dd69ea 100644 --- a/ImageBoardServerApp/Pages/Accounts/Register.razor +++ b/ImageBoardServerApp/Pages/Accounts/Register.razor @@ -21,6 +21,13 @@
+
+
+
+ @if (msg != null) + { + @msg + } @@ -36,7 +43,20 @@ private async Task login() { if (!is18) + { + msg = "You have to be atleast 18 years old to register."; return; + } + if (!Email.Contains("@") || !Email.Contains(".")) + { + msg = "This Email address is not valid!"; + return; + } + if (Password.Length < 6) + { + msg = "Your password has to be longer then 6 characters."; + return; + } Console.WriteLine("Registering..."); UserData userToCreate = new UserData() { diff --git a/ImageBoardServerApp/Pages/Accounts/Register.razor.css b/ImageBoardServerApp/Pages/Accounts/Register.razor.css index 1b050a0..8c749bc 100644 --- a/ImageBoardServerApp/Pages/Accounts/Register.razor.css +++ b/ImageBoardServerApp/Pages/Accounts/Register.razor.css @@ -8,4 +8,8 @@ font-style: unset;} .gaping{ alignment: left; +} + +.msg{ + color: #ff191c; } \ No newline at end of file