enforce minimum length for required fields

I've made a change so the factories will enforce the minimum length for required fields, and updated the corresponding tests so the fields in the sample documents are the correct length. 

I realized after pushing my code that my editor had cleaned up some of the trailing whitespace in the original files. I hope that's OK.