If you post the html of that input I can help better. Otherwise:
var element = document.getElement('input');
//or
var element = $('inputID');
//or
var element = document.querySelector('input');
Then use
element.value == 8
or element.get('value') == 8
You can check here also the Mootools docs
As @dimitar pointed out and I didn't mention, you need to listen for the submit of the form and then use this the code to check the input value.
Example:
var form = $('myForm');
form.addEvent('submit', function (e) { // attach event to the form
e.stop(); // prevent it from being submited
var input = this.getElement('input'); // get the input element
if (input.value != 8) { // verify the value
alert('The value is not 8'); // inform the user
return false; // end the function
} else this.submit(); // otherwise, continue the submit
});