server icon indicating copy to clipboard operation
server copied to clipboard

Game title additional constraints

Open Askaholic opened this issue 3 years ago • 3 comments

We should probably be stripping white space off the ends and enforcing a minimum length for the game title.

Also see: https://github.com/FAForever/downlords-faf-client/issues/2420

Askaholic avatar Nov 18 '21 16:11 Askaholic

wouldnt it be better to implement this in the client ?

KaukaHan avatar Nov 22 '21 07:11 KaukaHan

Validation of the values should always be done server side as there is no way to guarantee that we will only receive valid values from any client.

Sheikah45 avatar Nov 22 '21 10:11 Sheikah45

Yea we have to do it on both. The client can do it on a user friendly way that provides instant and localized feedback, but the server is the only place where we can actually guarantee that the rules are followed since there are many different client versions out there, and people can always use one that doesn’t have the checks.

Askaholic avatar Nov 22 '21 15:11 Askaholic