我如何指定文本框包含像数字或字母 [英] How Can I Specifies Text Box Contains Like Numeric Or Alphabetic

查看:88
本文介绍了我如何指定文本框包含像数字或字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想指定包含将在文本框中使用,例如字符限制和数字或字母或特殊或最小的全部或两个字母大写或小如密码创建文本框条件请帮帮我

如何使用=^(?=。{8,16} $)(?=。* \ d)(?=。* [az])(?=。 * [AZ])。*对于此

i want to specifies the contains going to be use in text box like limit of char and numerical or alphabetic or special or minimum one all of them or two of them in case of alphabetic capital or small just like password creating text box conditions please help me
how to use ="^(?=.{8,16}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*" for this

推荐答案

)(?=。* \ d)(?=。* [az])(?=。 * [AZ])。*for this
)(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*" for this


您想使用蒙版文本框来验证输入。

MSDN上的这个页面有一个日期示例时间格式,我相信您可以将示例代码用于您要在文本框中设置的数据类型。



MaskedTextBox.ValidatingType Property [ ^ ]



祝你好运。
You want to use a masked textbox to validate the input.
This page at MSDN has an example for date time format, I'm sure you can adopt the example code to the data type you want to set in your textbox.

MaskedTextBox.ValidatingType Property [^]

Good luck.


这篇关于我如何指定文本框包含像数字或字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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