Closed mstrYoda closed 5 years ago
It resolves the issue : https://github.com/andrebaltieri/flunt/issues/6
Desired example use case in issue:
Contract.Required().IfNotNull(x.LastName, contract => contract.MinLength(3));
Implemented feature :
_dummy = new Dummy(); _dummy.stringProp = "abc";
var wrong = new Contract() .Requires() .IfNotNull(_dummy.stringProp, x => x.IsDigit(_dummy.stringProp, nameof(_dummy.stringProp), "Property should be digit if not null"));
@andrebaltieri Hi Andre, do you have any free time to review this pr?
It resolves the issue : https://github.com/andrebaltieri/flunt/issues/6
Desired example use case in issue:
Contract.Required().IfNotNull(x.LastName, contract => contract.MinLength(3));
Implemented feature :
_dummy = new Dummy(); _dummy.stringProp = "abc";
var wrong = new Contract() .Requires() .IfNotNull(_dummy.stringProp, x => x.IsDigit(_dummy.stringProp, nameof(_dummy.stringProp), "Property should be digit if not null"));