Add in max field length and restrict to alphanumerics. Fixes #2213. Fixes #2212. Fixes #2211.