Add page specific javascript from plugin

//add jquery plugins for specific page
add_action( "template_redirect", "check_to_enqueue_scripts" ) );

//function to check if propose-trade page then enqueue scripts
function check_to_enqueue_scripts(){
if( is_page( 338 ) ){
add_action('wp_enqueue_scripts', "enqueue_plugin_scripts" );
}
}
//function to enqueue my page specific scripts
function enqueue_plugin_scripts(){
wp_enqueue_script('my-page-specific-script');
wp_enqueue_script('jquery-ui-droppable');
wp_enqueue_script('jquery-ui-sortable');

}

WP Admin Messages Hook

<?php

function print_message($message,$is_error = false){
if($is_error) echo '<div id="message" class="error">';
else echo '<div id="message" class="updated fade">';
echo "<p><strong>$message</strong></p></div>";
}

function message_config(){
print_message('This is an Error',1);
print_message('This is a Warning');
}

if(!get_option('myoptionname')) add_action('admin_notices','message_config');

?>

Validate Gravity Form Hook

<?php
//Validate After Hours
function ps_custom_validation($validation_result){
$form = $validation_result['form'];
if(ucfirst($_POST['input_6']) != 'Kimberly'){
$validation_result['is_valid'] = false;
foreach($form['fields'] as &$field){
if($field['id'] == '6'){
$field['failed_validation'] = true;
$field['validation_message'] = 'The name entered is not valid.';
break;
}
}
}
$validation_result['form'] = $form;
return $validation_result;
}
add_filter('gform_validation_2','ps_custom_validation');
?>