Added ability to turn validation on and off