@@ -262,7 +262,7 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
262
262
} ) ;
263
263
264
264
test ( 'should accept only Cyrillic characters when pattern is set' , async ( { page } ) => {
265
- await page . setContent ( `<ion-input-otp type="text" pattern="[А-Яа-я ]">Description</ion-input-otp>` , config ) ;
265
+ await page . setContent ( `<ion-input-otp type="text" pattern="[\\p{Script=Cyrillic} ]">Description</ion-input-otp>` , config ) ;
266
266
267
267
const inputOtp = page . locator ( 'ion-input-otp' ) ;
268
268
const firstInput = page . locator ( 'ion-input-otp input' ) . first ( ) ;
@@ -275,7 +275,7 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
275
275
276
276
test ( 'should accept only Chinese characters when pattern is set' , async ( { page } ) => {
277
277
await page . setContent (
278
- `<ion-input-otp type="text" pattern="[\\u4e00-\\u9fff ]">Description</ion-input-otp>` ,
278
+ `<ion-input-otp type="text" pattern="[\\p{Script=Han} ]">Description</ion-input-otp>` ,
279
279
config
280
280
) ;
281
281
@@ -290,7 +290,7 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
290
290
291
291
test ( 'should accept only Japanese characters when pattern is set' , async ( { page } ) => {
292
292
await page . setContent (
293
- `<ion-input-otp type="text" pattern="[\\u3040-\\u309F\\u30A0-\\u30FF] ">Description</ion-input-otp>` ,
293
+ `<ion-input-otp type="text" pattern="\\p{Script=Hiragana} ">Description</ion-input-otp>` ,
294
294
config
295
295
) ;
296
296
@@ -305,7 +305,7 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
305
305
306
306
test ( 'should accept only Korean characters when pattern is set' , async ( { page } ) => {
307
307
await page . setContent (
308
- `<ion-input-otp type="text" pattern="[\\uAC00-\\uD7AF\\u1100-\\u11FF] ">Description</ion-input-otp>` ,
308
+ `<ion-input-otp type="text" pattern="\\p{Script=Hangul} ">Description</ion-input-otp>` ,
309
309
config
310
310
) ;
311
311
@@ -320,7 +320,7 @@ configs({ modes: ['ios'] }).forEach(({ title, config }) => {
320
320
321
321
test ( 'should accept only Arabic characters when pattern is set' , async ( { page } ) => {
322
322
await page . setContent (
323
- `<ion-input-otp type="text" pattern="[\\u0600-\\u06FF] ">Description</ion-input-otp>` ,
323
+ `<ion-input-otp type="text" pattern="\\p{Script=Arabic} ">Description</ion-input-otp>` ,
324
324
config
325
325
) ;
326
326
0 commit comments