Make attributes be required according to a condition


#1

I have a form object using hanami-validations. I want to make all my attributes required according to a condition. I begin to use rules, but it pollutes my code too much because it is several attributes. Does anyone have suggestions?


#2

Hi, would you mind to share an example. It would help a lot. Thanks :+1:


#3

I don’t put all attributes here.

Unless the status is draft I want that the attributes be required.