fix backporting of formvalidation.

fixes #1328