No, YANG bits type will not let you do that, since no relation between individual bits ever exists by default - other than the notion of all of them belonging to the same set of "configurable flags".
This is where a union type would be a viable modeling decision.
leaf check-type {
type union {
type enumeration {
enum Whole-platform;
}
type bits {
bit NSO-checks;
bit ESC-checks;
}
}
default Whole-platform;
}
Doing this implies an XOR (mutual exclusivity) between value Whole-platform
and the set of remaining bit values to the reader.
Valid values:
<check-type>Whole-platform</check-type>
<check-type>NSO-checks</check-type>
<check-type>NSO-checks ESC-checks</check-type>
Invalid:
<check-type>Whole-platform ESC-checks</check-type>
You could leave your type as is and handle the one bit to rule them all in a description, since that is just human readable normative text.
description "Implementations must ensure an XOR relationship between
'Whole-platform' bit value and the other bit values of this
leaf. When the former is used it means that
...";
Note: what you are trying to achieve is an implementation detail.