Skip to content

Commit 1bd266b

Browse files
committed
feat: test코드 수정 및 디자인 패턴 md 파일 추가
1 parent fc64d34 commit 1bd266b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

docs/design/jalee_validation_design_point.md

Whitespace-only changes.

docs/design/validation_design_point.md

Whitespace-only changes.

src/components/login/PasswordInput.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import InputForm from '../common/InputForm.tsx';
22
import { useLoginState } from '../../stores/loginStore.ts';
3-
import { isValidPassword } from '../../utils/authUtils.ts';
3+
import { LooseValidation, ValidateProcessor } from '@/utils/authUtils.ts';
44

55
const PasswordInput = () => {
66
const { password, passwordHandler } = useLoginState();
77

8+
const validator = new ValidateProcessor(new LooseValidation());
9+
810
return (
911
<InputForm
1012
defaultValue={password}
@@ -16,7 +18,7 @@ const PasswordInput = () => {
1618
type={'password'}
1719
id={'password-input'}
1820
aria-label={'login-password-input'}
19-
error={!isValidPassword(password)}
21+
error={!validator.isValidPassword(password)}
2022
errorText={'비밀번호는 6자리 이상이어야 합니다.'}
2123
/>
2224
);

0 commit comments

Comments
 (0)