Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Improved package name validation #2687

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

EvanBacon
Copy link
Contributor

Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@brentvatne
Copy link
Member

we should probably explain somewhere what the validation criteria is

function validatePackage(value: string): boolean {
return /^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z][a-zA-Z0-9_]*)+$/.test(value);
/**
* Validates an Android package name given the following constraints: https://developer.android.com/studio/build/application-id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EvanBacon EvanBacon merged commit a1b565e into master Sep 23, 2020
@EvanBacon EvanBacon deleted the @evanbacon/cli/improved-package-validation branch September 23, 2020 11:12
brentvatne added a commit that referenced this pull request Sep 25, 2020
brentvatne added a commit that referenced this pull request Sep 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

disallow android reserved words in the package name
2 participants