I have a D8 form where when a test involving the value of other fields fails, if the publish (field = status) checkbox has been checked the validation should fail and the checkbox should be cleared when the form with error message is re-displayed.
I have made numerous attempts in permutations of custom callback for
#value_callback, as set dynamically by
while the function fires in each case, and the
setErrorByName() call works in each, in no case is the Publish checkbox cleared when the form reloads.