It is necessary to display errors in alert (), the only thing is that errors come in the form of array. Similarly, I displayed errors, but only when it came as a string. I can not understand yet, help

code example when working with string

-> $(".actions_sing_in").click (e) -> $("form#new_user").bind "ajax:success", (e, data, status, xhr) -> console.log data if data.success $('#sign_in').modal('hide') $('#sign_in_button').hide() $('#submit_comment').slideToggle(1000, "easeOutBack" ) else alert 'Status: ' + status + ' Message: ' + data.data.message 

Closed due to the fact that the essence of the question is not clear to the participants of the D-side , cheops , user194374, aleksandr barakin , lexxl Aug 5 '16 at 8:31 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • And how should it look like? Just a comma to list all the errors? - anoam
  • one
    It depends on what form your reply JSON is. - D-side

0