better error messages on validation failures