back-end validation and error styling