andrebaltieri / Flunt

Validations and Notifications
https://github.com/andrebaltieri/flunt
MIT License
624 stars 162 forks source link

Add ability to have conditional rules in contracts #6

Open thiagolunardi opened 6 years ago

thiagolunardi commented 6 years ago

Example:

Contract .Required() .IfNotNull(x.LastName, contract => contract.MinLength(3)); Means: LastName is not required, but if informed, must have more 3 letters or more.

fgemig commented 6 years ago

I agree! A conditional validation is extremely useful!

andrebaltieri commented 3 years ago

Moved to version 2! Check milestones!

leandro-almeida commented 3 years ago

This feature is a must have!

filipimosquini commented 3 years ago

Is there any prediction for this feature to be available?

andrebaltieri commented 3 years ago

Sure @filipimosquini... there's a new version comming soon!