Handle answer validation errors for JSON requests

make AnswersController return validation errors on JSON requests
add Javascript to handle the errors returned by controller