Closed kgrishchenyuk closed 4 years ago
The only complete solution would be a custom callback, but I try to keep this plugin simple. So the correct solution is to wrap this function in your own (third party) plugin. If you do that I will include it with all useful third party plugins in this repo.
Sorry, but I'm just a beginner, I'm afraid I won't be able to make a whole plugin correctly. Maybe later. But thanks for the reply anyway!
In my case, I have nodes of two types: folders and files, I'm making a file explorer. When unique plugin is enabled, it doesn't allow me to create a folder if a file with the same name already exists. I solved that issue by patching the 'check' function in the plugin. It is most likely not optimal, but here is what I got:
As you can see here, in the beginnig I'm forming an object including node's type and name instead of just string for futher operations with it.
So, can we have an in-built option for making validation only type-level?