Fixes #755 - Add a validator for field length

(cherry picked from commit 0bd582946e8820d5ff5eec2a07e39e826759927c)