enable and disable classConstraint