I\'ve been trying to work out how to create a FluentValidation rule that checks if the instance of an object it\'s validating is not null, prior to validating it\'s properti
By means of Custom(). It can be also very helpful when validation of another field is based on validation of your current field.
ruleBuilder.Custom((obj, context) => { if (obj != null) { var propertyName = ; context.AddFailure(propertyName, "'Your field name' Your validation message."); } });