掩盖appcelerator上的输入

时间:2016-03-15 18:51:35

标签: appcelerator appcelerator-titanium appcelerator-alloy

我的应用上有手机输入:

<TextField id="FieldTelefone" class="textArea"></TextField>

我想创建一个电话掩码,最好使用REGEX,但我很难在appcelerator上这样做。

我需要它: (XX)_xxxx-XXXX 要么 (xx)_xxxx-xxxxx

巴西电话号码模式。

但我只能用javascript来做这件事,但我可以验证它,有人可以帮助我吗?

1 个答案:

答案 0 :(得分:3)

这个git repo会帮助你:https://github.com/Nyvra/titanium-appcelerator-fields-mask

你肯定要扩展脚本,但你会看到它是如何工作的

相关问题