validate icon indicating copy to clipboard operation
validate copied to clipboard

Should validate warn when a rule is an `&` of two rules?

Open edwindj opened this issue 2 years ago • 0 comments

validator captures a set of rules that all must be obeyed for a record/dataset to be valid.

So implicitly all rules are AND / &-ed. When a rule consist of the & of two rules, it can / should be split in two separate validation rules: both are to be enforced on their own.

e.g.

# one rule
rules <- validator( age >= 0 & income >= 0 )

# equivalent but better because they really are separate rules.
rules <- validator( 
   age >= 0
 , income >= 0
 )

Should validator generate a warning when it encounters a & rule?

edwindj avatar Feb 24 '22 09:02 edwindj