When using validation-callback to implement a custom validation schema, UsersMultiselectWidget appears to run this callback twice per value (eg. T270634: Use UsersMultiselectWidget in SecurePoll create form). The second one should not occur.
Description
Description
Related Objects
Related Objects
Event Timeline
Comment Actions
@Tchanders I looked into this more and it looks like it's not actually duplicating the callback. The validation-callback function is being called as part of getErrorsRaw() which happens when the page instantiates. I think what we're seeing is when you try to add an invalid admin, it reloads the poll form (triggering getErrorsRaw()) and then also returns the result of the validation we actively requested. This "doubling up" doesn't happen if you successfully edit the poll (since the poll won't reload on the success page, we only see the active validation check).
If you agree, let's close this out?