title: How to validate data input on a sharepoint form?
body: <p>How does one verify a text field with another list's column? I am currently populating a Drop down list with a datasource and then comparing the text field with items in the dropdown using javascript. Is there a better way?</p>
  
  <p>The second problem I am having is how to trigger the Validate Function. </p>
  
  <p>I am aware of two custom forms for adding data to a sharepoint list. One is created using The Dataview Webpart in Sharepoint Designer and the other is created using the List Form Webpart in Sharepoint Designer.</p>
  
  <p>I have a DataFormWebPart I created using Sharepoint Designer Insert Dataview ->Insert Selected Fields as New Item Form. This gives Save and Cancel buttons at the end of the form. How do I intercept the Save button event?</p>
  
  <p>I found one solution but it only works with the NewForm page that has OK Cancel Buttons. <a href="http://www.codeproject.com/KB/sharepoint/Control_validation.aspx" rel="noreferrer">http://www.codeproject.com/KB/sharepoint/Control_validation.aspx</a></p>