Cocona icon indicating copy to clipboard operation
Cocona copied to clipboard

Can't do Validation across multiple options

Open xt1 opened this issue 4 months ago • 0 comments

Great framework - love it - but I've run into a problem.

We have two separate options on a parameter set: ConnectionString and DbUser If the ConnectionString is specified, DbUser is not required. If the ConnectionString is not specified, then DbUser is required. If neither is specified, then both are required.

A ValidationAttribute is only passed one variable at a time - there is no way to validate the set of options as a whole for consistency. Or am I missing something? There doesn't appear to be a good place to slot in an extra validation step, or to add a validation attribute to the class. :-(

xt1 avatar Oct 18 '24 07:10 xt1