Ajax form validation is one of those features typically tasked to a Drupal Developer. Here is how it is accomplished in Drupal 6.
Let's say we were adding Ajax form validation to the user registration page. You need to create a jQuery event listener in a javascript file.
$(document).ready(function(){
$("#edit-name").blur(function () {
$.post('modulename/validate', { name: this.value }, function(data) {
$('#edit-name-wrapper .description').append(data);
});
});
});