Every post / page / post type is wrapped around a universal form with the ID of #post
. So if you want to validate a page before submitting it you just need to say something like:
jQuery(document).ready(function($){
$('#post').submit(function(){
// Validate Stuff
return false;
});
});
Then you’ll want to actually enqueue your javascript – View Codex
function my_enqueue($hook) {
if ( 'edit.php' != $hook ) {
return;
}
wp_enqueue_script( 'my_custom_script', plugin_dir_url( __FILE__ ) . 'myscript.js' );
}
add_action( 'admin_enqueue_scripts', 'my_enqueue' );
As far as your concern that another on submit handler will cancel out yours, from what I’ve tested it doesn’t matter how many submit handlers return true, if 1 is false, the form will not submit.