Skip to content

Commit

Permalink
fix: phone number validation logic in usePhoneState
Browse files Browse the repository at this point in the history
  • Loading branch information
iPagar committed Apr 16, 2024
1 parent 963ea6b commit a080e1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/use-phone-state/use-phone-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const usePhoneState = ({

if (phone.trim() === '') {
setPhoneNumber('');
setCountry(initialCountry);
setIsValid(false);
return '';
}
Expand Down

0 comments on commit a080e1a

Please sign in to comment.