Validator: improved length validation on strings