made new validate and errors