If the Form Validation & Field Settings dialog is NOT accessed, then the code generated is correct. 
theres the key that was missing. I had not been making any validation changes in my tests. I wasn't aware making changes was necessary to reproduce the problem. I will log this in our bug base to have the problem corrected.


