Skip to content

Commit 696599e

Browse files
Joshua Zhoujoshuazhou744
authored andcommitted
check for empty parsed
1 parent d8ba66f commit 696599e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/features/Account/validationSchema.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ const getValidationSchema = (isCreate: boolean) => {
2424
(value) => {
2525
if (!value) return false;
2626
const parsedValue = value?.replace(/\D/g, '');
27-
return (
28-
!parsedValue || (parsedValue.length > 10 && parsedValue.length < 14)
29-
);
27+
if (!parsedValue) return false;
28+
return parsedValue.length > 10 && parsedValue.length < 14;
3029
}
3130
),
3231
age: number()

0 commit comments

Comments
 (0)