Show success or error messages in Ajax response to WordPress custom registration form

How can I show these errors inside the Ajax success or error functions?

The jQuery error is triggered, when the request itself fails, for example timeout and others. See the jQuery documentation.

The error messages, which are produced by PHP appear only on request success.

To display these, you could do for example:

            success: function(data){
                jQuery( data ).appendTo( 'body' );
            }

It will need some styling though 🙂

EDIT:
Since in your script it is possible, the whole form-element will be outputted, you can prevent this by using regular expressions in the success-callback:

        success: function(data){
            if( ! data.match( /<form/ ) )
                jQuery( data ).appendTo( 'body' );
        }

So you can use regular expressions to prevent appending output, you might not want to output.