error messages and validations working