aws-amplify-auth-starters icon indicating copy to clipboard operation
aws-amplify-auth-starters copied to clipboard

invalid phone number

Open idkjs opened this issue 5 years ago • 0 comments

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

idkjs avatar Aug 18 '19 16:08 idkjs