Check the studs of the wall with a 4-foot level when you stand it into place to ensure that they are perfectly vertical. Hold the level vertically against the outside face of a stud and look at the bubble in the glass cylinder. The bubble should be in the center of the cylinder.
Check the wall with a plumb bob to confirm what you read on your level. A plumb bob functions with gravity, so it's foolproof. Hang the plumb bob from the top plate of the wall by pressing the string against the face of the top plate with your finger. The point of the plumb bob at the bottom of the string should touch the edge of the bottom plate.
Secure the top and bottom plates to the ceiling joists and the flooring with 3-inch-long screws after you have positioned it to be perfectly plumb and have checked it with a level and a plumb bob.