protect string attributes from too long values