0

I want to validate if the inputted text is in Katakana.

I have this:

Validators.pattern('[\u30A0-\u30FF]+')

But I also want to accept spaces in between. What should I add?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
Char
  • 2,073
  • 8
  • 28
  • 45

1 Answers1

1

I solved this problem. I added \.<space>

Validators.pattern('[\u30A0-\u30FF\. ]+')

This accepts Katakana characters and space/s in input field

Char
  • 2,073
  • 8
  • 28
  • 45