Closed koh-sh closed 5 months ago
@koh-sh Thanks for the PR. We will review and merge asap
@maunzCache Is there anything else I need to do for this pull request? If everything looks good, I would appreciate it if you could merge it into the main branch.
@koh-sh and @maunzCache thanks for working on this. Please allow sometime for it to be reviewed internally and merged into the main code
@maunzCache Is there anything else I need to do for this pull request? If everything looks good, I would appreciate it if you could merge it into the main branch.
I have no permissions and affiliations with the project. Was just curious to see your change and help out tawoyinfa
@tawoyinfa Sorry, I thought he was one of the maintainers. Please review the pull request when you have time.
@maunzCache Still, thanks for the comment.
@koh-sh this code is now merged. Thanks for putting in the work
Issue #, if available: resolve https://github.com/aws-samples/iam-identity-center-team/issues/163
Description of changes: I changed regexp for validation of comment and justification to support unicode characters. So, users should be able to use Japanese and some other Asian languages.
I tested my regexp with some samples, please check if this is appropriate behavior.
Backend (click to open)
``` $util.matches("[\p{IsAlphabetic}\p{Digit}]", "A") ## upper -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", "a") ## lower -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", "1") ## number -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", "あ") ## Japanese -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", "아") ## Korean -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", "你") ## Chinese -> true $util.matches("[\p{IsAlphabetic}\p{Digit}]", " ") ## space -> false $util.matches("[\p{IsAlphabetic}\p{Digit}]", "!") ## symbol -> false $util.matches("[\p{IsAlphabetic}\p{Digit}]", " ") ## tab -> false $util.matches("[\p{IsAlphabetic}\p{Digit}]", "") ## empty -> false ```
Frontend (click to open)
``` bash-5.2$ cat t.js var arr = ['A', 'a', 1, 'あ', '아', '你', ' ', '!', ' ', '' ]; for (const elem of arr) { console.log(elem + ": " + /[\p{L}\p{N}]/u.test(elem)) } bash-5.2$ node t.js A: true a: true 1: true あ: true 아: true 你: true : false !: false : false : false bash-5.2$ ```
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.