updated validation for front end errors and success