Reputation: 1061
I am using Cakephp3.4, Bootstrap, jQuery for my project. For client side validation, I am using Parsley JS. For server side validation I am relying on Cakephp validations. To save data I send Ajax request of Form data and get json response of success or fail. Now I want to display server side validation message for a particular field. My parsley validation setup can be seen in this Fiddle
This is the response pattern of failed validation from server side.
{
"result": {
"status": "1100",
"msg": "Validation Failed",
"errors": {
"email": "Email Already Exists"
},
"data": []
}
}
I know that there is method of remote validation in parsley, but I can not (do not want to) use it as this is just small example while actual scenario will contain multiple fields and that would just make too many Ajax calls.
Does any one knows how can I show response.result.errors.email message in a tool-tip next to email input?
Upvotes: 0
Views: 461