CRM-14842 fix string validation