Can a fieldname contain a dash?

Hi,

I couldn’t find this in the docs: can a fieldname contain a dash?

I’ve just spent a while figuring out why the “filterBy” function didn’t work on a specific field until I tried removing the hyphen from the fieldname in the content markdown file.

If so, can you add this to the documentation? I’m sure others will walk into the same issues too.

Thanks!

The information is hidden in an old blog post:

Field names must only contain alphanumeric characters and underscores.

Thanks for your hint, I’ll add this to the docs asap.

1 Like

I think, this kind of help

would be a great step in the docs.
I know, that nearly all details can be found in the docs (thank you all!!!), but here in this post (it is a blog but can be a normal docs article too) we can read both sides at ONE place: the content files and how to get the contents in the code. If someone would add the corresponding blueprints then it would be almost impossible to improve this.

@anon77445132: We are working on the docs and started to update the Cheat Sheet. Next step will be to go through the current blog posts and update them as guides.