Skip to content

Bug: CultureInfo isn't passed when parsing #16

@bkoelman

Description

@bkoelman

StringTypeConverterBase<> does not pass along the incoming culture to its abstract Parse method. It should, and derived types should pass it along to the DateOnly.Parse and TimeOnly.Parse methods.

Because of the current behavior, properties such as RangeAttribute.ConvertValueInInvariantCulture and RangeAttribute.ParseLimitsInInvariantCulture have no effect when using ASP.NET ModelState binding/validation. The parsing happens in the "current" culture, which is the OS-level regional settings of the web server that the application is running on. It should be possible to avoid that by parsing using the invariant culture. That way, the web application can be deployed to servers all over the world and behave the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions