Edit in JSFiddle

//let's add our custom validator
Form.Validator.add('doesNotContainTheLetterQ', {
  errorMsg: 'This field cannot contain the letter Q!',
  test: function(field){
      return !field.get('value').test(/q/,'i');

//and our instance of Form.Validator for our form
new Form.Validator($('myform'), {
    //I don't want to show an alert when you blur the field,
    //only when you click submit
    evaluateFieldsOnBlur: false,
    evaluateFieldsOnChange: false,
    onFormValidate: function(passed, myform, event) {
        if (passed) alert('Nice job!');
        else alert('I HATE THE LETTER Q... AND I HATE YOU TOO!');
<form id="myform">
    <input type="text" class="doesNotContainTheLetterQ"/>
    <input type="submit">