title: How do I validate with FluentValidation that my Datetime? field has the good format?
body: <p>I have a property of type <code>Datetime?</code> that I want to validate with FluentValidation.</p>
  
  <p>Here is the property : </p>
  
  <pre><code>public DateTime? StartContractDate { get; set; }
  </code></pre>
  
  <p>Here is my actual Validator who works very good with a good formated date :</p>
  
  <pre><code>RuleFor(x =&gt; x.StartContractDate).Cascade(CascadeMode.StopOnFirstFailure)
  .NotNull().WithMessage(localizationService.GetLocaleStringResourceByName("Contract.Create.Create_Identification.Validate.StartContractDate").ResourceValue)
  .Must(StartContractDateValidation).WithMessage(localizationService.GetLocaleStringResourceByName("Contract.Create.Create_Identification.Validate.StartContractDateValidation").ResourceValue);
  </code></pre>
  
  <p>I tried what I saw in that link <a href="https://stackoverflow.com/questions/7777985/validate-datetime-with-fluentvalidator">Validate DateTime with FluentValidator</a> without success, I go in the <code>BeAValidDate</code> function but in the navigator I still have the error "The value 'XXX' is not valid for 'StartContractDate' instead of my custom message that I put in <code>WithMessage(...)</code>.</p>
  
  <p>If you have any suggestion ? </p>