Validates fields and create error messages