Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need define optional caractere #5

Closed
netstart opened this issue Nov 24, 2016 · 4 comments
Closed

Need define optional caractere #5

netstart opened this issue Nov 24, 2016 · 4 comments
Assignees

Comments

@netstart
Copy link

We need define opcional caractere in the pattern

@stevermeister
Copy link
Contributor

@netstart could you provide an example please?

@ozknemoy
Copy link

for example for different lang
{'Ё': /[a-zA-Zа-яА-ЯёЁ]/}
this._maskAwaliablePatterns = {
'0': /\d/,
'9': /\d/,
'A': /[a-zA-Z0-9]/,
'S': /[a-zA-Z]/,
'Ё': /[a-zA-Zа-яА-ЯёЁ]/
};

@rodolfocop
Copy link

I think that would be something simple!
Add to directive

`
@input('maskOptionsPatterns')
maskOptionsPatterns: any = {};

ngAfterViewInit() {
this._maskAwaliablePatterns = Object.assign({}, this._maskAwaliablePatterns, this.maskOptionsPatterns);
}
`
And to input

[mask-options-patterns]="{ key: 'Ё': /[a-zA-Zа-яА-ЯёЁ]/}"

NepipenkoIgor pushed a commit that referenced this issue May 30, 2017
@NepipenkoIgor NepipenkoIgor self-assigned this Sep 28, 2017
@NepipenkoIgor
Copy link
Collaborator

@netstart @rodolfocop New version of ngx-mask available. You could check optional characters and other options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants