Skip to content

Commit

Permalink
Revert "Making Culture Invariant When Validating Date to negate defer…
Browse files Browse the repository at this point in the history
…ent formats (#17257)"

This reverts commit dabaeac.

# Conflicts:
#	src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/Validators/DateTimeValidatorTests.cs
  • Loading branch information
nul800sebastiaan committed Nov 14, 2024
1 parent b4609e0 commit 9056851
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using Umbraco.Cms.Core.Models.Validation;
using Umbraco.Extensions;

Expand All @@ -26,7 +25,7 @@ public IEnumerable<ValidationResult> Validate(object? value, string? valueType,
yield break;
}

if (DateTime.TryParse(value.ToString(), CultureInfo.InvariantCulture, out DateTime dt) == false)
if (DateTime.TryParse(value.ToString(), out DateTime dt) == false)
{
yield return new ValidationResult(
$"The string value {value} cannot be parsed into a DateTime",
Expand Down

This file was deleted.

0 comments on commit 9056851

Please sign in to comment.