show validation messages and fixed error of index.html.erb