Refactor string fluent validator to reduce repeated code