The House of Delegates passed a bill Tuesday that would ease requirements for candidates trying to get onto the Virginia ballot.

The legislation, approved on an 80-18 vote, comes after several presidential candidates, including former House speaker Newt Gingrich, failed to qualify for the state’s March primary ballot.

Virginia requires candidates to collect 10,000 signatures, with at least 400 from each of the congressional districts, to appear on the ballot. Those who collect signatures must be residents of the congressional districts and eligible to vote.

The bill says that signatures only have to be collected by those who are residents of Virginia. A presidential candidate who does not live in the state would also be able to collect their own signatures.

The bill now heads to the Senate. If passed, it would take effect immediately upon signature of Gov. Bob McDonnell (R). McDonnell’s office did not immediately respond to questions about the bill.

It would pertain not to this year’s presidential race, but would change the rules for those running for U.S. Senate and Congress.

Only former Massachusetts governor Mitt Romney and Rep. Ron Paul (Tex.) will appear on the Virginia primary ballot.

Gingrich and other GOP candidates, including former Pennsylvania senator Rick Santorum, sued to get on the March 6 ballot but a judge ruled against them.

U.S. District Judge John A. Gibney Jr. said he thought a provision requiring the candidates to use only state residents was unconstitutional, but none of the candidates had managed to collect the required 10,000 signatures. The bill does change that those who collect signatures have to be residents.