I would like to use FluentValidation to change the format of an input based on a second value
The example in the FluentValidation documentation I am following is: (although my values are all strings)
Transform(x => x.SomeStringProperty, StringToNullableInt)
.GreaterThan(10);
int? StringToNullableInt(string value)
=> int.TryParse(value, out int val) ? (int?) val : null;
My method the Transform would call is:
public static string FormatPostCode(string postcode, string countryCode)
How do I pass the countryCode in the Transform statement?