# Ion-Input Mask

**URL:** <https://forum.ionicframework.com/t/ion-input-mask/135099>\
**Category:** ionic-v3\
**Created:** [July 12, 2018, 10:19am UTC](https://forum.ionicframework.com/t/ion-input-mask/135099 "2018-07-12T10:19:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cfwebsitesde](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cfwebsitesde](https://forum.ionicframework.com/u/cfwebsitesde)\
**Post date:** [July 12, 2018, 10:19am UTC](https://forum.ionicframework.com/t/ion-input-mask/135099/1 "2018-07-12T10:19:51Z")

</div>

Hey there, I searching for a method to restrict some input.  
I need a input field which only allows to enter numbers like \_ \_ \_ \_ - \_ \_ (for example 0200-10) i tried the ionic input mask ([here](https://www.npmjs.com/package/ionic-input-mask)) but i got some errors.

> Error: Template parse errors:  
> ‘input-mask’ is not a known element:
> 
> 1. If ‘input-mask’ is an Angular component, then verify that it is part of this module.
> 
> 2. If ‘input-mask’ is a Web Component then add ‘CUSTOM\_ELEMENTS\_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("  
> Test

I already include the input-mask module in app.module.ts but this still does not work. Do you guys have any idea what to do or where i have to additionally include the input-mask module OR how I can restrict the input?

best regards

---

<div class="post-metadata">

**Author:** ![cfwebsitesde](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@cfwebsitesde](https://forum.ionicframework.com/u/cfwebsitesde)\
**Post date:** [July 12, 2018, 10:42am UTC](https://forum.ionicframework.com/t/ion-input-mask/135099/2 "2018-07-12T10:42:05Z")

</div>

I got it to work, ty anyway xD

---

<div class="post-metadata">

**Author:** ![Thoron23](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/thoron23/32/109646_2.png) [@Thoron23](https://forum.ionicframework.com/u/Thoron23)\
**Post date:** [November 14, 2018, 4:32am UTC](https://forum.ionicframework.com/t/ion-input-mask/135099/3 "2018-11-14T04:32:37Z")

</div>

were you able to get input masking to work using this? [https://www.npmjs.com/package/ionic-input-mask](https://www.npmjs.com/package/ionic-input-mask)

---

<div class="post-metadata">

**Author:** ![omazdex](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/omazdex/32/128160_2.png) [@omazdex](https://forum.ionicframework.com/u/omazdex)\
**Post date:** [September 8, 2019, 7:20am UTC](https://forum.ionicframework.com/t/ion-input-mask/135099/4 "2019-09-08T07:20:39Z")

</div>

Care to share how you got it working? i’m facing the exact same problem. ☹

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:30pm UTC](https://forum.ionicframework.com/t/ion-input-mask/135099/5 "2021-07-19T21:30:01Z")

</div>

Closed on July 19, 2021, 9:30pm UTC


