-- Fixed bug with validation and error messages