Follow-up from "Resolve "Block emojis and symbol characters from user's full names""
The following discussion from !24523 (merged) should be addressed:
-
@wortschi started a discussion So long story short, I think this approach won't get us over the finish line and we should not create the regex from the list of emojis we get from Rails. Instead we could do one the following:
- Use a range RegEx in JS to match emojis (there might be some 3rd party packages we could use for this) or
- Submit an async request and do the validation on the server (which we need to do anyway). Ideally we could start with (1) in the first version and implement (2) in a second iteration since we might need that as well in other places (see https://gitlab.com/gitlab-org/gitlab-ce/issues/56787 for example)
Since we need to implement server-side validation for blocking emojis from the user's full name anyway, we should eventually build an API in order to being able to re-use the existing validation pattern from the BE.
Edited by Martin Wortschack