Quantcast
Channel: Fluent Validation for .NET
Viewing all articles
Browse latest Browse all 1917

Edited Unassigned: Possible to use same model validate two times? [7172]

$
0
0
```
public class MyModel
{
public int Id { get; set; }
public string Name { get; set; }
public int Gender{ get; set; }
public string Model{ get; set; }
}
public class SaveModelValidator : AbstractValidator<MyModel>
{
public SaveModelValidator()
{
RuleFor("123");
}
}

public class PeriodModelValidator : AbstractValidator<MyModel>
{
public PeriodModelValidator()
{
RuleFor("456");
}
}
```
Hi guys,I want to validate like this,but for me it didnt worked.do you have any good idea? thanks.

Viewing all articles
Browse latest Browse all 1917

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>