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

Collection name validation is too strict #720

Closed
ghost opened this issue Jul 21, 2018 · 2 comments
Closed

Collection name validation is too strict #720

ghost opened this issue Jul 21, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2018

Case

Bug

Issue

The regular expression here:

const regStr = '^[a-z][a-z0-9]*$';

The link here:

* @link https://wiki.apache.org/couchdb/HTTP_database_API

Is 404 Not Found, but an older version of it says:

A database must be named with all lowercase letters (a-z), digits (0-9), or any of the ''_$()+-/'' characters and must end with a slash in the URL. The name has to start with a lowercase letter (a-z).

This suggests that a more accurate regex would be ^[a-z][_$a-z0-9]*$ (excluding ()+-/ because they are not valid in JavaScript identifiers).

@ghost ghost mentioned this issue Jul 21, 2018
1 task
@ghost
Copy link
Author

ghost commented Jul 21, 2018

If you don't want to allow $ and _ in the terminal position because it's reserved, I can amend the regex in my PR for that.
I really just want an underscore in the middle of a name.

@pubkey
Copy link
Owner

pubkey commented Jul 22, 2018

Hi @errorx666 thank for the PRs and Issues. I am currently working hard on rxdb v8.0. The review will take a while but will come. Just that you know..

@pubkey pubkey closed this as completed in 4a49247 Jul 31, 2018
pubkey added a commit that referenced this issue Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant