New Comment on "Validators"
In my model have three Seprate Properties for the DateofBirth 1) Month :1-12 :int 2) Day : 1-31 :int 3)Year : 1900-2000 Then how can i check by using fluentvalidation . because there have leaveyear....
View ArticleNew Post: How to add the Property value with the localizemessage
Hi There are additional overloads for WithMessage and WIthLocalizedMessage that allows you to specify other properties that can be used within the error message. Example: RuleFor(x =>...
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Hi , In my model there is a property Age public int? Age {get;set;} For that i have create a Fluentvalidation Rule but it is not working fine. but required validation is working fine.RuleFor(x =>...
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Could you provide more details? What do you mean when you say it's "not working fine"? Perhaps you could provide a working unit test that illustrates the problem?
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Hi , thanks for the reply . but i read many articles for that but i have not found any result for that. Can you please provide me the solution for that.
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Hi I'm afraid I can't see what the problem is. If this isn't working as expected, I need you to provide a working sample (preferably a unit test) that demonstrates the problem. I can't help further...
View ArticleNew Post: Range Validation Not working but another vaildations are working.
No in which have NotNull is working fine but GreaterThanOrEqualTo and LessThanOrEqualTo not working.
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Yes, I understand that but I need to you to provide a full code sample that shows the problem.
View ArticleNew Post: How to add the Property value with the localizemessage
Hi Sir, It is not working. I am providing you to full sample. Model Code [Validator(typeof(CustomerModelValidator))] public class CustomerModel { public int? Age { get; set; } public int Groupindex {...
View ArticleNew Post: How to add the Property value with the localizemessage
You're not using WithLocalizedMessage properly - it doesn't take a string. It should take a reference to a property that points to a resx file - this is explained in this page in the documentation Also...
View ArticleNew Post: How to add the Property value with the localizemessage
I already use the WithMessage that is not working.
View ArticleNew Post: DateTime Validation with 3 Fields
Hi Experts, I have the same synario but for that my client site validations are not working could you please provide us to the code for the same. Thanks & Regards
View ArticleNew Post: Range Validation Not working but another vaildations are working.
Yes please provide me the Sample for that if you have.. Thanks & Regards Anubhava
View ArticleNew Post: Required Client Side Validation on Date in MVC Razor.
Hi Everybody, I have a class Customermodel in which have birthday,birthmonth,birthyear properties. So i am trying to create a valid date Rules for client side that but i am not able to create it. So...
View ArticleNew Post: Where to put IValidatorInterceptor
I have an implementation of IValidatorInterceptor that I'm using to pull some data out of CustomState and put it into ViewData so I can access it in Views (it's an implementation of validation...
View ArticleNew Post: Where to put IValidatorInterceptor
Hi Dave The CustomizeValidatorAttribute is a custom IModelBinder implementation which means you can put it on the model class instead of on the action parameter if you prefer. The caveat here is that...
View ArticleNew Post: .When doesn't work
Hi, I am facing a strange problem when I write a rule to validate a field "document" I coded this way. RuleFor (model => model.DocumentId) . NotEmpty (). WithLocalizedMessage (()...
View ArticleNew Post: .When doesn't work
HiI can't reproduce this I'm afraid - when I try this the When clause executes as expected. Please put together a failing unit test that reproduces the problem and then I'll be able to investigate...
View ArticleNew Post: Range Validation Not working but another vaildations are working.
No, you haven't understood what I'm saying. You need to give me a sample of what you're trying to do. If you're not able to do this then I can't help you further.
View Article