title: How to validate date in SOAP request message
body: <p>I have a wcfservice where it gets request and sends a response.
  In the request object one of my element is of type DateTime.
  When i am passing correct format of DateTime(eg:2012-12-30),the response object works fine and there are no issues.
  But when i pass the element in correct format(eg: 201-12-30),the service gives exception and throws invalid date format exception.</p>
  
  <p>Correct request:</p>
  
  <pre><code>&lt;req:paymentDateDate&gt;2012-12-12&lt;/req:paymentDateDate&gt;
  </code></pre>
  
  <p>Bad request</p>
  
  <pre><code>&lt;req:paymentDateDate&gt;2012-12-12&lt;/req:paymentDateDate&gt;
  </code></pre>
  
  <p>and the response will be</p>
  
  <pre><code>&lt;InnerException i:nil="true"/&gt;
                   &lt;Message&gt;String was not recognized as a valid DateTime.&lt;/Message&gt;
  </code></pre>
  
  <p>how to validate it from code,I am validating for mindate as following:</p>
  
  <pre><code>  else if (request.paymentRequest.payment.paymentDateDate == DateTime.MinValue )
              {
                  FaultException fx = BillPayFaultResponse(request, "Schema Validation Failed", "Invalid content,element 'paymentDateDate' is required,but not found.");
                  throw fx;
              }  
  </code></pre>
  
  <p>how to validate for whether my service is receiving valid datetime string or not  </p>