espy / hoodie-plugin-tutorial

A detailed walkthrough of the plugin writing process
20 stars 10 forks source link

Error: invalid type'$direct-message': numbers and lowercase letters allowed only #8

Open elmarburke opened 10 years ago

elmarburke commented 10 years ago

I've got the error invalid type'$direct-message': numbers and lowercase letters allowed only in the frontend. I've got it fixed by renaming the database-name to directmessage.

gr2m commented 10 years ago

yes, - is not allowed in object types. Thanks @elmarburke for bringing it up, we'll fix that

gr2m commented 10 years ago

@espy we could do two things here:

  1. remove the dashes from the Tutorial and explain why that is
  2. Actually, we could allow - as long as it is not the first character. Reason is that I want to stay compatible with CouchDB database name restrictions, but - are allowed. Maybe they haven't been back when I created it, dunno.

I'd go with the second option. Any objects to have - in CouchDB doc._ids or database names @janl @caolan @svnlto?

janl commented 10 years ago

Maybe they haven't been back when I created it, dunno.

This hasn’t changed since the dawn of CouchDB :) The valid regex is: ^[a-z][a-z0-9_$()+/-]*$

svnlto commented 10 years ago

remove the dashes from the Tutorial and explain why that is

No need to explain it, the tutorial is in a draft state anyways, changes to it need not to be explained esp. if they are as trivial.

Actually, we could allow - as long as it is not the first character. Reason is that I want to stay compatible with CouchDB database name restrictions, but - are allowed. Maybe they haven't been back when I created it, dunno.

And add another layer of complexity - no.

I'd just amend the tutorial and move on :)