Add more verification to sign up

This commit is contained in:
Kurt Hutten
2021-09-30 20:28:13 +10:00
parent 879f24b08b
commit 3aa3254e48
3 changed files with 52 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ import type { Prisma } from '@prisma/client'
import { ForbiddenError } from '@redwoodjs/api'
function userNameVerification(userName: string): string {
if (userName.length < 6) {
if (userName.length < 5) {
throw new ForbiddenError('userName too short')
}
if (userName && ['new', 'edit', 'update'].includes(userName)) {