Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add invalidHint to phoneNumberInput (fix issue #1836) #1837

Merged
merged 2 commits into from
Apr 2, 2020
Merged

Add invalidHint to phoneNumberInput (fix issue #1836) #1837

merged 2 commits into from
Apr 2, 2020

Conversation

blankg
Copy link
Contributor

@blankg blankg commented Mar 29, 2020

Changes

Please describe both what is changing and why this is important. Include:

This PR should fix the issue described in issue #1836, by adding an invalidHint property the PhoneNumberInput component.
The invalidHint string is taken from phoneNumberInputInvalidHint which is optional (if not provided then this feature takes no effect) and can be provided in the languageDictionary.

for example:
new Auth0LockPasswordless(clientId, domain, { languageDictionary: { phoneNumberInputInvalidHint: "invalid phone number. only numbers are allowed" } });

Note: the phoneNumberInputInvalidHint can also be added to i18n files to make this behaviour default for the PhoneNumberInput.

References

#1836

Please note any links that are not publicly accessible.

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

snapshots updated with invalidHint prop

@blankg blankg requested a review from a team March 29, 2020 08:05
@stevehobbsdev stevehobbsdev added CH: Added language file Additions or changes to i18n language files labels Mar 31, 2020
@stevehobbsdev
Copy link
Contributor

@blankg Thanks for raising this! Let me test and understand the issue and I'll come back to you this week.

I can see we definitely will need some text for the lang files here, at least for English to start.

@stevehobbsdev stevehobbsdev linked an issue Apr 2, 2020 that may be closed by this pull request
@stevehobbsdev
Copy link
Contributor

stevehobbsdev commented Apr 2, 2020

On reflection, we already have something in our backlog to make sure all the translations are present - let's do the lang file changes when we do that work. For now, the key can be specified manually.

@stevehobbsdev stevehobbsdev added this to the vNext milestone Apr 2, 2020
@stevehobbsdev stevehobbsdev merged commit 1faf464 into auth0:master Apr 2, 2020
davidpatrick pushed a commit to davidpatrick/lock that referenced this pull request Jun 12, 2020
Co-authored-by: Steve Hobbs <steve.hobbs@auth0.com>
jfromaniello pushed a commit to jfromaniello/auth0-lock that referenced this pull request Jul 23, 2020
Co-authored-by: Steve Hobbs <steve.hobbs@auth0.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language file Additions or changes to i18n language files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

phone_number_input has no validation hint/msg
2 participants