title: Using ValidationGroup with Sharepoint EditorPart
body: <p>I have written a Sharepoint 2007 web part which requires validation in both the User form, and the Admin form (EditorPart).</p>
  
  <p>I am using InputFormRegularEdpressionValidator to do the validation like this:</p>
  
  <pre><code>tb = new TextBox();
  tb.ID = "myID";
  
  InputFormRegularExpressionValidator validTb = new 
                                   InputFormRegularExpressionValidator();
  validTb.ControlToValidate  = tb.ID;
  validTb.ValidationExpression = myRegExp;
  validTb.ValidationGroup = "AdminInput";
  
  this.Controls.Add(tb);
  this.Controls.Add(validTb);
  </code></pre>
  
  <p>I have defined two validation groups - one for the UserInput and the other for AdminInput.  I defined a submit button in the user form, and set this ValidationGroup to UserInput,</p>
  
  <p>However, I can't figure out how to apply the ValidationGroup AdminInput to the Ok and Apply buttons in the Editor part, or otherwise validate these fields.</p>
  
  <p><strong>How does one trigger validtion of EditorPart fields on clicking Ok/Apply separately from validation of fields in the public facing web part?</strong></p>