How to load some jquery code to make validation in the theme customizer?

Create a /js subfolder in your theme directory, if such does not exist already.
Save your script to a file in said folder.

Then, in functions.php:

if ( is_admin() ) {
    global $pagenow;

    if ( 'customize.php' === $pagenow ) {
        add_action( 'admin_enqueue_scripts', 'wpse107236_enqueue_customizer_script' );
    }
}

function wpse107236_enqueue_customizer_script() {
    wp_enqueue_script(
        'your-script-handle',
        get_template_directory_uri . '/js/your-script.js',
        array( 'jquery' ),
        '1.0',
        true
    );
}

Related Resources: