Merge remote branch 'cloudant:82197-fix-validation_func-case_clause'

This closes #224

Signed-off-by: Eric Avdey <eiri@eiri.ca>