SpringBoot Input validation of emoji

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



SpringBoot Input validation of emoji



I have a SpringBoot app. In one of the POST endpoints, in the request body it will contain emoji.


POST



I'm using the @Pattern annotation to do some input validation. But cannot get the emoji validation to work.


@Pattern



My latest attempt was for the emoji : 😀
to use the regex:


😀



@Pattern(regexp = "(\uD83D[\u0000-\uffff])")


@Pattern(regexp = "(\uD83D[\u0000-\uffff])")



and various variations with no luck. Any suggestions?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard