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.