add validation error creation to constructor