add validation and css styling to error messages