inSileco / formbuildr

R package to build form using the command line interface
https://insileco.github.io/formbuildr/
GNU General Public License v3.0
0 stars 0 forks source link

Validation via a list #6

Open KevCaz opened 4 years ago

KevCaz commented 4 years ago

A forms object should accept a list of value as an optional input and in this case it should skip the interactive parts and return a vector of logical to know which filed are valid and which are not.

For unit testing this is a very important feature.

KevCaz commented 4 years ago

This is working for individual questions. Now the goal is to make it work for the entire form, i.e. that in the following case:

q1 <- fob_among("Fruits?", c("Apple", "Pear"), "fruit", confirm = TRUE)
q2 <- fob_yorn("Be or not to be", "shake")
myform <- q1 %+% q2

myform() should accept a list of two elements and valid the tow question properly.

KevCaz commented 3 years ago

Before closing this, direct validation should be possible for multi forms.