aws-amplify-auth-starters
aws-amplify-auth-starters copied to clipboard
invalid phone number
Issue: https://github.com/aws-amplify/amplify-js/issues/3868#issue-482012666
I have deployed using the click to deploy
button.
While trying to sign in i get this error:
error signing up:
Object { code: "InvalidParameterException", name: "InvalidParameterException", message: "Invalid phone number format." }
I get this whether the format is +1 999-999-9999
or 999-999-999
which should work if I am reading the following correctly:
composePhoneNumber(dial_code, phone_line_number) {
return `${dial_code || '+1'}${phone_line_number.replace(/[-()]/g, '')}`;
}
https://github.com/aws-amplify/amplify-js/blob/ece0b229441357b754615052393e09bf8ecf6894/packages/aws-amplify-react/src/Auth/PhoneField.jsx#L25-L27