js length check.  string might be moved out to some strings config later