igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

[igxMask] can't stop inputting Japanese characters in spite of setting mask to alphanumeric.

Open tkiryu opened this issue 7 years ago • 3 comments

Description

I'm setting igxMask to "AAA", which means that igxMask allows us to input only alphanumeric characters.

<igx-input-group [type]="'box'">
  <input igxInput type="text" [igxMask]="'AAA'">
</igx-input-group>
  • igniteui-angular version: 7.1.8
  • browser: N/A

Steps to reproduce

  1. Go to https://stackblitz.com/edit/igxmask-japanese-character-issue
  2. Type "あ" in the textbox(Or, copy "あ" and paste it in the textbox).

Result

We are able to input Japanese characters.

Expected result

We should not be able to input Japanese characters.

Attachments

https://stackblitz.com/edit/igxmask-japanese-character-issue

tkiryu avatar Mar 06 '19 10:03 tkiryu

I found that the following built in mask rules have the same problem, in addition to "A: alphanumeric (0-9, a-Z)",

  • L: letter (a-Z)
  • ?: letter (a-Z) or a space
  • a: alphanumeric (0-9, a-Z) or a space

tkiryu avatar Mar 08 '19 08:03 tkiryu

@tkiryu currently A, ?, L mask rules which allow inputting letters will allow you to input letters not only from the English alphabet but any letters (bulgarian, japanese, etc.). If we forbid the input of other alphabets different than English one we will have complains why this is not supported. We'll discuss this matter with the team and will let you know what have we decided.

bkulov avatar Mar 12 '19 14:03 bkulov

@tkiryu I've discussed this with @StefanIvanov (who is our UX Architect) and we decided that this is not a but but it's done by purpose. Using A, ?, L, etc. mask rules should allow the user to input any alphabetic character not limited to only English alphabet. I'm closing this issue now. If you think that it will be useful for our clients to have more advanced control over the mask please log a new issue and mark it as feature request. We could implement a custom function which the user could use to add it's own logic to allow or disallow given character.

bkulov avatar Mar 14 '19 10:03 bkulov