Sure, it's server-side validation – which is great, and works well. And now it works without a full page submit and reload. That's a huge benefit.
This "solution" completely ignores the purpose of client-side validation which is to a) reduce load on server-side resources, b) validate faster without the network latency and c) validate more securely and privately by not sending the content to the server.