displaying only the first error
added alert on ajax error