I am getting an issue when trying to show Idenity register page in Arabic culture:
I disable all attributes one by one to figure out which one causing the issue and it seems to be the Compare attribute.
[Required]
[StringLength(maximumLength: 100, MinimumLength = 6)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
/// <summary>
/// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
[DataType(DataType.Password)]
[Display(Name = "Confirm password")]
[Compare(otherProperty: "Password")]
public string ConfirmPassword { get; set; }
I have tried to add specific validation error in Program.cs like this:
ops.ValidationErrors = new ValidationErrors
{
CompareAttribute_MustMatch="Values '{0}' must match value '{1}'"
};
nothing changes. same error: FormatException: Input string was not in a correct format.
Hello,
I am getting an issue when trying to show Idenity register page in Arabic culture: I disable all attributes one by one to figure out which one causing the issue and it seems to be the Compare attribute.
I have tried to add specific validation error in Program.cs like this:
nothing changes. same error: FormatException: Input string was not in a correct format.