File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/common/component/TextField/signup Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function formatBirthDate(value: string): string {
44 return digits ;
55 }
66 if ( digits . length < 7 ) {
7- return `${ digits . slice ( 0 , 4 ) } - ${ digits . slice ( 4 ) } ` ;
7+ return `${ digits . slice ( 0 , 4 ) } . ${ digits . slice ( 4 ) } ` ;
88 }
9- return `${ digits . slice ( 0 , 4 ) } - ${ digits . slice ( 4 , 6 ) } - ${ digits . slice ( 6 ) } ` ;
9+ return `${ digits . slice ( 0 , 4 ) } . ${ digits . slice ( 4 , 6 ) } . ${ digits . slice ( 6 ) } ` ;
1010}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { ERROR_MESSAGES } from './constants';
22
33export const NAME_REGEX = / ^ [ A - Z a - z 가 - 힣 ㄱ - ㅎ ㅏ - ㅣ \s ] { 1 , 10 } $ / ;
44export const JOB_REGEX = / ^ [ A - Z a - z 가 - 힣 ㄱ - ㅎ ㅏ - ㅣ \s ] { 1 , 15 } $ / ;
5- export const BIRTH_REGEX = / ^ \d { 4 } - \d { 2 } - \d { 2 } $ / ;
5+ export const BIRTH_REGEX = / ^ \d { 4 } . \d { 2 } . \d { 2 } $ / ;
66
77export function validateName ( value : string ) : string | undefined {
88 const v = ( value ?? '' ) . trim ( ) ;
@@ -24,7 +24,7 @@ export function validateBirth(value: string): string | undefined {
2424 return ERROR_MESSAGES . birth ;
2525 }
2626
27- const [ yy , mm , dd ] = v . split ( '- ' ) ;
27+ const [ yy , mm , dd ] = v . split ( '. ' ) ;
2828 const yearNum = parseInt ( yy , 10 ) ;
2929 const monthNum = parseInt ( mm , 10 ) ;
3030 const dayNum = parseInt ( dd , 10 ) ;
You can’t perform that action at this time.
0 commit comments