Add rules for validate form structure

Adds code generation for rules to validate form structure. Also
adds i18n messages. Using the xtend examples for @Externalized
annotations.