Add rules for validate form

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