Errors and validations working