Skip to content

Instantly share code, notes, and snippets.

@hersonls
Last active August 29, 2015 14:14
Show Gist options
  • Save hersonls/4eeb91ca8169318856d5 to your computer and use it in GitHub Desktop.
Save hersonls/4eeb91ca8169318856d5 to your computer and use it in GitHub Desktop.
Retorno de formulário em ajax
{
// true ou false, caso esteja com sucesso ou nao
"success": false,
// Mandar apenas se houver erros
"errors": {
"campo": "erro",
"campo": "erro",
"campo": "erro",
"campo": "erro",
"campo": "erro",
"campo": "erro",
},
// Mandar apenas se for sucesso, url que o usuario será redirecionado caso
// seja salvo com sucesso.
"redirect_to": "http://mege.com/dash/"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment