【发布时间】:2018-07-24 18:40:31
【问题描述】:
我有 TextField 使用 Angular nativescript。
<TextField (textChange)="onTextChange($event)" ></TextField>
我只想允许将“a”字符插入到该 TextField 中。
应该阻止所有其他字符(“b”、“c”、....) - 意思是 - 阻止插入。
我已经知道我可以使用 (textChange) 事件然后删除字符 - 但这是一个为时已晚的事件。
问题:
假设我有一个文本字段,我如何跨平台防止某些字符被输入?
【问题讨论】:
标签: angular nativescript angular2-nativescript