make validate_form only look up validate_cache once
Merge pull request #556 from dimagi/opt-validator

make validate_form only look up validate_cache once