NgMask force custom pattern

NgMask force custom pattern

I have an AngularJS project where I am using&nbsp;<a href="http://candreoliveira.github.io/bower_components/angular-mask/examples/index.html#/" target="_blank">NgMask</a>&nbsp;plugin, I want to force users to enter a specific pattern inside an input box.

I have an AngularJS project where I am using NgMask plugin, I want to force users to enter a specific pattern inside an input box.

Pattern example goes like: X01Y1234Z55

Where X,Y and Z are static characters, and users shouldn't be able to enter any other characters other than them, and the digits count should remain the same, X .. 2 Digits .. Y .. 4 Digits .. Z .. 2 Digits.

I have tried to use:

<input type="text" ng-model="unique_id" mask="X99Y9999Z99" restrict="reject">

but unfortunately that didn't work.

I am not familiar with Regex complicated stuff, so I am hoping that some Regex experts can help us out with that.

Thanks.

angular.js regex

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

Angular Charts: How To Add Charts In Angular 9 Example

To use charts in Angular, we will use the chart.js library to construct the charts. We will fake the backend server for data and display it on charts.

Basics of Angular: Part-1

What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc

What are the best alternatives for angular js?

<img src="https://moriohcdn.b-cdn.net/193902114c.png">There are numerous frameworks and libraries used across the globe. If not angular, there are platforms like React, Vue, Aurelia and so on for app development.

Angular 8 Node & Express JS File Upload

In this Angular 8 and Node.js tutorial, we are going to look at how to upload files on the Node server. To create Angular image upload component, we will be using Angular 8 front-end framework along with ng2-file-upload NPM package; It’s an easy to use Angular directives for uploading the files.