Psmb.CreateNodeButton
Psmb.CreateNodeButton copied to clipboard
Validation for title of new node
In most cases, it doesn't make sense to create a Node with an empty title. Therefore it would make sense to add an optional NotEmpty validator.
I tried adding one but found out that it's not that simple. Validation in the backend is based on node property configuration, and the title field is not a node property, but just a TextInput.
Just some random thoughts about it:
- It could be a good idea to actually allow configuring more than one field to be created, e.g. not only title, but also date, and therefore allow the same options as in the node creation dialog.
- If so, it would maybe make sense to just present a button "Create node" in the inspector which triggers the node creation dialog (from NodeTemplates) for creating a new node.