Add Kick player & Validators

This commit is contained in:
Ralex91
2024-02-03 00:14:04 +01:00
parent cd723f7efd
commit 8c57670742
18 changed files with 188 additions and 31 deletions

12
socket/src/validator.js Normal file
View File

@@ -0,0 +1,12 @@
import yup from "yup"
export const usernameValidator = yup
.string()
.required("Username is required")
.min(4, "Username cannot be less than 4 characters")
.max(20, "Username cannot exceed 20 characters")
export const inviteCodeValidator = yup
.string()
.required("Invite code is required")
.length(6, "Invalid invite code")