验证文本输入 [英] Validation for textinput

查看:86
本文介绍了验证文本输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据应用程序的各种条件实现文本框输入的验证.正确的方法或最佳做法是什么.

How can I implement the Validation for textbox input based on various conditions for the application.What is the right way or the best practice of doing it.

目前,我正在对每页后面的代码中的每个条件进行直接检查.

Currently I am doing a straight check for each condition in the code behind of each page.

文本框的条件不同.

请帮助.

推荐答案

通常,您可以使用 TextBox.InputScope 设置输入上下文.如果不足够,您可以修改或将其替换为自己的代码.

In general you can use the TextBox.InputScope to set the context for input.  If it is inadequate you can amend or replace it with your own code behind.

希望这会有所帮助,
标记

Hope this helps,
Mark


这篇关于验证文本输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆