A county Republican group in South Carolina wants its candidates to promise to not cheat on their spouses and not watch pornography.
But the state GOP says it would be illegal to keep candidates off the ballot only because they refuse to sign the pledge.
Bobby Smith, the chairman of the Laurens County Republicans, says the "purity pledge" endorsed by the group last month is meant to encourage good values in the party's candidates.
He says it won't prevent anyone from getting on the ballot.
The pledge would require candidates to promise they have not had premarital sex and will protect gun rights and oppose abortion, among other things.
The state Republican party says it would be illegal to enforce such a pledge.