aspnet/jquery-validation-unobtrusive

Validation fails for date ranges when the value is valid

GavinSutherland opened this issue · 3 comments

I have an Asp.Net Core 2 MVC site using unobtrusive validation v3.2.6. Using FluentValidation (v7.2.1) server side my nullable DateTime property is being rendered as:

<input class="text-box single-line input-validation-error" data-val="true" data-val-range="'Birthdate' must be between 1/1/2016 00:00:00 and 1/1/2018 00:00:00." data-val-range-max="1/1/2018 00:00:00" data-val-range-min="1/1/2016 00:00:00" id="DateOfBirth" name="DateOfBirth" type="datetime-local" value="" aria-describedby="DateOfBirth-error" aria-invalid="true">

Regardless of what date value I enter (in range or out) it always shows the following validation message:

'Birthdate' must be between 1/1/2016 00:00:00 and 1/1/2018 00:00:00.

My environment is set to EN-US culture so not sure if that is having any effect or not. Any ideas what's going on here? Is this a known issue?

Thank you for filing this issue. In order for us to investigate this issue, could you please provide a minimalistic repro project that illustrates the problem?

Hi. We're closing this issue as no response or updates have been provided in a timely manner and we have been unable to reproduce it. If you have more details and are encountering this issue please add a new reply and re-open the issue.

So frustrating....