Basically Ek Kosmos has the basic idea. The easiest would be to create a small custom module, this has the advantage of isolating the feature you want to build, and remember the #1 rule, you really never want to hack anything in core, unless you really cannot avoid it.
Once you have your .info file setup in a folder and .module file ready to go as indicated in the many how-to's on the subject, you leverage the power of hook_form_alter by writing a function named your-module-name _form_alter in your module file and you know that function will be called.
You would probably need a switch statement dependent in the form)alter to perform specific actions depending on the form id,
You would probably need to try adding an attribute (#validate) that adds a function call on the form array, being a function name of your own custom validation function.
// #validate adds callback to custom validator.
$validators = $form['#validate']; // Save existing validation calls.
// Not clear in docs, but this is important!
// In your case, you may want to add a method callback with this attribute.
$form['#validate'] = $validators . ' _custom_validate';
Of course, in your validation function you could log errors, redirect, assign error messages or notifications.
Do read the form api and download the form examples.
If you need help and examples galore, download contrib modules and see how others tackeled the beast, or post questions here as you go along.
Happy conding, good-luck.