Custom validators

Thank you!
One more thing. Is it possible to pass the error messages to the client side, so the custom error message would appear near the corresponding input inside the form just like the native validation messages?