Use correct attribute to display error message