Open progala opened 3 years ago
Thanks. I have addressed this immediate bug by not allowing manager-type fields to be used with regex rules (they wouldn't work this way anyway). The use case however, is very interesting and we can create a new rule type with allows for constraining the set of tags that can be added to an object.
I played with the idea of a "tag list" validation rule, but the major roadblock is that tags are a many-to-many relationship and thus we can't access them on an object in the clean() method. I will brainstorm some ways we can deal with this.
Is this issue still relevant or should it be closed?
I think this should be reopened - to the best of my knowledge M2M validation isn't a solved problem yet in this App?
Environment
Steps to Reproduce
Example rule used for testing:
Expected Behavior
One of two outcomes should happend:
Observed Behavior
TypeError is raised: "expected string or bytes-like object"
Full traceback: