support for maxLength, minLength, length. Needs more work to allow these to be specified along with a pattern, etc.
generic constructor function
generic constructor function