You wouldn't typically do this with FluentValidation. FV is designed primarily to work against a view-model/input-model type architecture where everything is already flattened. So you'd typically project both Foo and Bar's amount properties to a separate object, and then validate this.
Another approach would be to have both Foo and Bar as properties on another object:
Jeremy
Another approach would be to have both Foo and Bar as properties on another object:
public class SomeContainer {
public Foo Foo {get;set;}
public Bar Bar {get;set;}
}
...and then define your validator as an AbstractValidator<SomeContainer>, so you can then access both Foo and Bar from within it.Jeremy