A string validator for ActiveModel to verify it can be converted to the specified encodings.