Loadout definitions can create compliance for each slot primaries. If no primary types are selected, the unit can use and primary – otherwise only the primaries selected are allowed.
If a unit is not in compliance with a target primary, that mod slot will appear with a red border on the mod set preview screens.