Simple question regarding filtering

My game has a system where you can give your pets custom names.

Would it be possible for players to enter malicious text (that has been ran through the text filter) that could cause a datastore error

I’m confused what you mean by this, if you can explain your issue more and specific what your worried about. This is what you could do if your really worried:

Add requirements. For example if the text filter, filters out like 90 precent of the Name, don’t let them name their pet that Name. Also add limits so like the Pet name can’t be longer then 20-50 characters.

Would the datastore “error” because of a filtered result you saved or normal characters, it really shouldn’t as long as you are setting up your datastore correctly (You could even Tell Roblox that the string is a string with tostring(YourStringPetName) which will return a string for sure and this can be used before saving it, and loading it). Although if you have more specific concerns, I would be happy to address

I doubt the data store could get messed up. If it does, then it probably wasn’t by accident, but I would recommend storing it like normal.

Datastores only accept a certain range of characters. I was wondering if the filter would prevent characters outside of this range from being stored.

Here is what the Text Filtering article says about saving potentially filterable names to a DataStore:

  • Stored Text - If your experience stores text such as a chat log or a user’s pet name using data stores, and the stored text might include inappropriate words, you should filter the text strings when retrieving them. This ensures that you use the most up-to-date version of the text filter.