design pattern to use for complicated form
<p>My form has a number of fields with autocomplete and trying to refactor so I am not creating spaghetti code in javascript. And for those autocomplete fields I need to validate with remote call on submit. For autocomplete I would use the decorator pattern but I am not sure how can I  implement the validation part.</p>

<pre><code>textBox = new ZipCodeAutocomplete( new TextBox() );
textBox2 = new CompanyNameAutocomplete( new TextBox() );
</code></pre>
