From 08f114a15c0293519d240f0acbd02d47c60d6187 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 9 Jun 2022 11:03:12 -0400 Subject: [PATCH] min chars --- .../features/verification/registration.tsx | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/verification/registration.tsx b/app/soapbox/features/verification/registration.tsx index 8b76dce34..68a4805db 100644 --- a/app/soapbox/features/verification/registration.tsx +++ b/app/soapbox/features/verification/registration.tsx @@ -1,4 +1,5 @@ import { AxiosError } from 'axios'; +import classNames from 'classnames'; import * as React from 'react'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; @@ -9,7 +10,7 @@ import { fetchInstance } from 'soapbox/actions/instance'; import { startOnboarding } from 'soapbox/actions/onboarding'; import snackbar from 'soapbox/actions/snackbar'; import { createAccount, removeStoredVerification } from 'soapbox/actions/verification'; -import { Button, Form, FormGroup, Input } from 'soapbox/components/ui'; +import { Button, Form, FormGroup, HStack, Icon, Input, Stack, Text } from 'soapbox/components/ui'; import { useAppSelector } from 'soapbox/hooks'; import { getRedirectUrl } from 'soapbox/utils/redirect'; @@ -44,6 +45,8 @@ const Registration = () => { const [shouldRedirect, setShouldRedirect] = React.useState(false); const { username, password } = state; + const meetsLengthRequirements = React.useMemo(() => password.length >= 8, [password]); + const handleSubmit = React.useCallback((event) => { event.preventDefault(); @@ -119,6 +122,21 @@ const Registration = () => { onChange={handleInputChange} required /> + + + + + + 8 characters + +