Rectangle 27 0

Parsley remote validator looks for HTTP response code not for the body content itself. In your example you're returning json data with probably always HTTP 200 status code.

Hi guillaumepotier, first of all, thanks for your incredible development and answering questions like mine. In my case I'm returning response codes, because I saw your answer in another thread saying that, but I really don't know what my php server code need to answer. I tried many many things. May be the right questions are: - What the server code need to answer in order to indicate to parsley the OK and KO conditions? HTTP Responses, php key-value pairs...? - In which format (json, plain text,...) need to be answered? Again, thank you very much for your interest and software. Esteve.

Parsley 2.0 currently only look for HTTP Response status: 200 => OK everything else => NOK. If you're more comfortable with javascript than PHP, you can in parsley remote define your custom validator to look for something else, for example the json response code, like shown here: parsleyjs.org/doc/index.html#extras Hope that helps

parsley.js - How to configure Parsley remote validator to handle my AP...

parsley.js