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

feat: add IsFirebasePushId validator #548

Merged
merged 2 commits into from Mar 18, 2020
Merged

Conversation

elmarti
Copy link
Contributor

@elmarti elmarti commented Mar 9, 2020

This PR adds support for Firebase-style PushIds, you can see more about the science and inner-workings here: https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html

Overview
Simply, we're checking:

  • The input must be a string
  • The string must be 20 characters in length
  • The string must only contain web-safe characters

I've checked the backlog and PRs for duplicates and found nothing.

test/functional/reject-validation.spec.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@vlapo
Copy link
Contributor

vlapo commented Mar 16, 2020

Also name IsPushId is really misleading. What about IsFirebasePushId ?

@elmarti
Copy link
Contributor Author

elmarti commented Mar 17, 2020

@vlapo Agreed, although the Firebase part was excluded as they can exist and be used apart from Firebase, however in practice they're not really.

@vlapo vlapo changed the title feat: add IsPushId feat: add IsFirebasePushId validator Mar 18, 2020
@vlapo vlapo merged commit e7e2e53 into typestack:master Mar 18, 2020
@github-actions
Copy link

github-actions bot commented Aug 3, 2020

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants