andrebaltieri / FluentValidator

Fluent Validator is a fluent way to use Notification Pattern with your entities
122 stars 40 forks source link

Added FunctionValidationContract #15

Closed miltoncamara closed 7 years ago

miltoncamara commented 7 years ago

Can let user validate a custom function.

var isValidPerson = new ValidationContract()
    .Must(IsValidPerson, new Person("Milton", "Camara", 15), "This person cannot buy tickets");
fgemig commented 7 years ago

Nice!

andrebaltieri commented 7 years ago

For performance purposes we excluded the use of reflection. You can compare two objects implementing IComparable interface. Will create an issue to implement it (But without reflection).