title: mvc 5 validation and change DOM elements
body: <p>I have a MVC 5 normal application.</p>
  
  <p>In a textbot user need to write ad username (or maybe "name surname"). I use the [Remote] Annotation and a Validation function on controller is called.</p>
  
  <p>Into the Validation function I make a LDAP query and if I find only 1 result I give true to validation, otherwise if nothing found or more than 1 result is found I return false.</p>
  
  <p>Until here, there is no problem.</p>
  
  <p>If validation is ok, I would to set the textbox value (or maybe an hidden value) with the exact AD username.</p>
  
  <p>For example:
  In my domain there is user marco.rossi, and is the only Marco in AD.
  If I search "Marco" in AD validation is ok. But When user will submit I want pass domain\marco.rossi.</p>
  
  <p>So I would set into an hidden or better change the textbox value from marco to domain\marco.rossi.</p>
  
  <p>How I can set Textbox value into validation function?</p>
  
  <p>Thank you in advance.</p>