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

How to prevent special character in input box #141

Open
arya-himanshu opened this issue Jul 31, 2018 · 1 comment
Open

How to prevent special character in input box #141

arya-himanshu opened this issue Jul 31, 2018 · 1 comment

Comments

@arya-himanshu
Copy link

How to prevent special character in input box

@sanatani9
Copy link

sanatani9 commented Sep 25, 2018

you can use pattern and (onError) for that.
P.S: this will not prevent special character. But will execute myHandleError($event) and you can write you required code there.

<inline-editor type="text" [(ngModel)]="editableText" (onSave)="saveEditable($event)" name="editableText1" size="8" disabled="true" min="1" max="8" pattern="^[a-zA-Z]{1,3}" (onError)="myHandleError($event)"></inline-editor>

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

No branches or pull requests

2 participants