Use field maxlength instead of magic number