YAML: Singular or Plural is valid?

I have YAML metadata in my files that shows the list of one or more authors.

But it shows as invalid (“Type mismatch”).

Sometimes there’s a single author and sometimes multiple. Both show the same error. I’ve been trying to figure out what the cause might be since it looks correct. I discovered that when I use a singular form of a property (“Author”), it shows as invalid, but when I change it to plural (“Authors”) it shows as valid.

plural

Why is Obsidian forcing me to use the plural name of a property for it to be valid?

Is it possible that you have another property named Author defined in the vault? Check the “All Properties” view to locate.

No, there’s only one “Author” property. This is a vault specifically for files with this same YAML metadata, so it’s “clean” in that sense.

Well, in my vault plurality doesn’t matter. Author and Authors list properties each work without errors.

If you look at the icon in front of the one with the warning it says that this is a “text” field. It doesn’t care about what you’ve written as a name. You need to change the type by clicking on the icon and select Property type > List, and then the warning will go away.

1 Like

Ah, this is the issue. The types.json file didn’t have that property defined as multitext. Thanks @holroy . :smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.