moves global errors array into validator class