fix: username min length + fixed condition (#982)
fixed #981 `url.length <= 6` >>> `url.length < 6` also removed debug message from the form component
This commit is contained in:
@@ -119,8 +119,6 @@ export const SignUpFormV2 = ({
|
||||
form.formState.dirtyFields.signature &&
|
||||
form.formState.errors.signature === undefined;
|
||||
|
||||
console.log({ formSTate: form.formState });
|
||||
|
||||
const { mutateAsync: signup } = trpc.auth.signup.useMutation();
|
||||
|
||||
const onFormSubmit = async ({ name, email, password, signature, url }: TSignUpFormV2Schema) => {
|
||||
|
||||
@@ -25,7 +25,7 @@ export const authRouter = router({
|
||||
|
||||
const { name, email, password, signature, url } = input;
|
||||
|
||||
if ((true || IS_BILLING_ENABLED()) && url && url.length <= 6) {
|
||||
if (IS_BILLING_ENABLED() && url && url.length < 6) {
|
||||
throw new AppError(
|
||||
AppErrorCode.PREMIUM_PROFILE_URL,
|
||||
'Only subscribers can have a username shorter than 6 characters',
|
||||
|
||||
Reference in New Issue
Block a user