Magnetic perturbations caused by field errors may pose a threat to magnetic confinement. They can cause the formation of magnetic islands, which may increase transport. The response of a reversed-field pinch (RFP) plasma to field errors has been calculated numerically. A three-dimensional nonlinear magnetohydrodynamic code was used, with field errors specified as boundary conditions. Two types of field errors were studied: those arising from current flowing in the toroidal field coil set and those arising from induced currents in the conducting shell flowing around holes. Design data from two RFPs at the Los Alamos National Laboratory — ZT-40 (currently operating) and ZT-H (being designed) — were used. Results on the effect of the plasma on the radial field perturbation and on island size are given. The effects of the chosen equilibrium current profile, resistivity, and viscosity are discussed.