try must, I always use it
RuleFor(a => a.Street).Must(x => x=="hello");
//will return false untill a.street == hello
or
RuleFor(a => a.Street).Must(BeAValidAddress())
private bool BeAValidAddress(string adress)
{
//...some logic
return false;
}
or
RuleFor(a => a.Street).Must(x => BeAValidAddress(x))
private bool BeAValidAddress(string adress)
{
//...some logic
return false;
}
all this mean the same.