title: Validating / clearing all inputboxes using dojo
body: <p>1)I have a dojo widget  inside which i loads 2 more widgets.Now at some point i want to clear all text boxes within the widget.One method is :</p>
  
  <pre><code>this.myAttachPoint.value="".
  </code></pre>
  
  <p>But doing this will increase lines of code.How can i use some alternative code that clears all fields ?</p>
  
  <p>2)Also for validations i was checking each field. EG</p>
  
  <pre><code>if(this.myAttachpoint.value.trim() == "" ){
   //show soime error message
  }
  </code></pre>
  
  <p>Now i have 50 fields in my widgets and its increasing lines of code.Can any one suggest me some alternative?</p>