From 947412b0a29c8f55b08605ee63f31a7e614bdeaf Mon Sep 17 00:00:00 2001 From: Tobias Mahnke Date: Tue, 20 Apr 2021 17:18:44 +0200 Subject: [PATCH] fix: min length for password --- frontend/src/components/RegistrationForm.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/RegistrationForm.tsx b/frontend/src/components/RegistrationForm.tsx index b9c197e..2515124 100644 --- a/frontend/src/components/RegistrationForm.tsx +++ b/frontend/src/components/RegistrationForm.tsx @@ -12,10 +12,10 @@ export default function RegistrationForm({ }: { onSubmit: (data: RegistrationFormSubmit) => void; }) { - const [username, setUsername] = React.useState(null); - const [email, setEmail] = React.useState(null); - const [password, setPassword] = React.useState(null); - const [password2, setPassword2] = React.useState(null); + const [username, setUsername] = React.useState(''); + const [email, setEmail] = React.useState(''); + const [password, setPassword] = React.useState(''); + const [password2, setPassword2] = React.useState(''); const onChangeUsername = React.useCallback((e) => setUsername(e.target.value), []); const onChangeEmail = React.useCallback((e) => setEmail(e.target.value), []); @@ -32,7 +32,14 @@ export default function RegistrationForm({
- +