{
"type": "TextInput",
"required": true,
"label": "National ID Number",
"name": "national_id",
"input-type": "text",
"min-chars": 14,
"max-chars":15,
"helper-text": "eg. 70-123456-C-78"
}
在我的个人详细信息屏幕上,我从 textInput 中获取用户 ID,但是,我想验证使用此模式“^(?i)\d{2}-\d{5,7}-”获得的输入[A-Za-z]-\d{2}$"。我该怎么办?
流程目前不支持正则表达式进行验证。您只能通过添加端点来验证这一点,该端点会将值提交到后端服务器以验证该字段并向流程返回错误消息。您可以使用 TextInput 上的“错误消息”字段显示错误消息
添加 Flow 端点的文档 https://developers.facebook.com/docs/whatsapp/flows/guides/implementingyourflowendpoint