Closed ewelinaprus closed 8 years ago
I found some solution with yield break on TextValue property, but I have found further problems too... My ModelState.GetErrors() returns error for field new_date, but on my partial view there are new_date.TextValue and new_date.DateValue only. I guess that is some problem with binding error to field because of names (new_date and new_date.TextValue).
Hi, You can use the second argument of the ValidationResult constructor, e.g:
return new ValidationResult(Resx.ErrorMessage, new List<string> { "TextValue" });
It works! Thanks a lot! :)
Hello, I use custom validation on many fields in my model, but usually with string and some numeric types. Now I want to use them on BsDateTime field or another Bs* field, but I found some error:
"Validation type names in unobtrusive client validation rules must be unique.".
How cant I fix it?
With my best, Ewelina