暂时是没有现成的校验工具类,需要自己写校验方法,TextInput有提供showError显示错误信息。参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-textinput-V5\#showerror10表单校验代码示例:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-textinput-V5\#示例2
暂时是没有现成的校验工具类,需要自己写校验方法,TextInput有提供showError显示错误信息。
参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-textinput-V5\#showerror10
表单校验代码示例:https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/ts-basic-components-textinput-V5\#示例2