title: Ckeditor plugin - validating a text field
body: <p>I am creating plugin
  I have this piece of code below:</p>
  
  <p>What i am trying to do is make sure the email address they enter is valid. 
  Just not sure how to stop the onOK if the email address is not valid.</p>
  
  <p>Thanks</p>
  
  <p>This is a code snippet of the plugin</p>
  
  <pre><code>contents : [
      {
              id : 'info',
              label : editor.lang.form.title,
              title : editor.lang.form.title,
              elements : [
                      {
                              id : 'destEmail',
                              type : 'text',
                              label : 'Email form results to:',
                              'default' : 'randy@me.com',
                              required : true,
                              accessKey : 'T',
                              commit : function( element )
                              {
                                  var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
                                  if (this.getValue().search(emailRegEx) == -1) {
                                      alert("Please enter a valid email address.");
                                      return false;
                                  }
                                  element.setAttribute('id', this.getValue() );
                              }                   
                     }
              ]
      }
  ]
  </code></pre>