mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-14 04:25:35 +01:00
13 lines
341 B
JavaScript
13 lines
341 B
JavaScript
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")
|